-
Notifications
You must be signed in to change notification settings - Fork 200
Adding a new dependency to TileDB
Julia Dark edited this page Feb 18, 2022
·
4 revisions
There are several steps to adding a new dependency to TileDB. Most of the complexity is setting up a CMake external project for the new dependency. Broadly, the steps are:
- Add a new file
cmake/Modules/Find<Dep>_EP.cmakewhere<Dep>is the name of the dependency. It's easiest if you follow the pattern of an existing dependency, such asFindBlosc_EP.cmake. -
include()the new CMake file incmake/TileDB-Superbuild.cmakenext to the other dependency includes. - Add a call to
find_package(<Dep>_EP)intiledb/CMakeLists.txtnext to the other dependencyfind_package()calls. - Link to the dependency by adding
<Dep>::<Dep>to thetarget_link_libraries(TILEDB_CORE_OBJECTS_ILIB ...)command intiledb/CMakeLists.txt. - Add a call to
append_dep_lib(<Dep>::<Dep>)next to the other calls toappend_dep_libintiledb/CMakeLists.txt. This is required to support transitive linking against the dependency for static TileDB when usingtarget_link_libraries(tgt TileDB::tiledb_static).
Dependencies built by external projects must be statically linkable. Any exceptions should be discussed in advance with justifications and team approval.