diff --git a/tiledb/CMakeLists.txt b/tiledb/CMakeLists.txt index c5f6928e529..15314a67dff 100644 --- a/tiledb/CMakeLists.txt +++ b/tiledb/CMakeLists.txt @@ -411,16 +411,22 @@ add_library(TILEDB_CORE_OBJECTS OBJECT ${TILEDB_EXTERNALS_SOURCES} ) +# List of libraries to be linked to TILEDB_CORE_OBJECTS and TILEDB_CORE_OBJECTS_STATIC. +set(TILEDB_CORE_OBJECTS_LIBS + baseline +) + +list(TRANSFORM TILEDB_CORE_OBJECTS_LIBS PREPEND "$" OUTPUT_VARIABLE TILEDB_CORE_OBJECTS_LIBS_SOURCES) + target_sources(TILEDB_CORE_OBJECTS PUBLIC - $ + ${TILEDB_CORE_OBJECTS_LIBS_SOURCES} ) target_link_libraries(TILEDB_CORE_OBJECTS - PRIVATE - common PUBLIC - baseline + ${TILEDB_CORE_OBJECTS_LIBS} ) target_link_libraries(TILEDB_CORE_OBJECTS INTERFACE object_store_definitions) @@ -475,11 +481,12 @@ if (WIN32 AND TILEDB_STATIC) target_sources(TILEDB_CORE_OBJECTS_STATIC PUBLIC - $) + ${TILEDB_CORE_OBJECTS_LIBS_SOURCES} + ) target_link_libraries(TILEDB_CORE_OBJECTS_STATIC PUBLIC - baseline + ${TILEDB_CORE_OBJECTS_LIBS} ) target_compile_definitions(TILEDB_CORE_OBJECTS_STATIC