Skip to content

Adding a new dependency to TileDB

Julia Dark edited this page Feb 18, 2022 · 4 revisions

Adding a new dependency to TileDB

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:

  1. Add a new file cmake/Modules/Find<Dep>_EP.cmake where <Dep> is the name of the dependency. It's easiest if you follow the pattern of an existing dependency, such as FindBlosc_EP.cmake.
  2. include() the new CMake file in cmake/TileDB-Superbuild.cmake next to the other dependency includes.
  3. Add a call to find_package(<Dep>_EP) in tiledb/CMakeLists.txt next to the other dependency find_package() calls.
  4. Link to the dependency by adding <Dep>::<Dep> to the target_link_libraries(TILEDB_CORE_OBJECTS_ILIB ...) command in tiledb/CMakeLists.txt.
  5. Add a call to append_dep_lib(<Dep>::<Dep>) next to the other calls to append_dep_lib in tiledb/CMakeLists.txt. This is required to support transitive linking against the dependency for static TileDB when using target_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.