Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ find_package(iceberg CONFIG REQUIRED COMPONENTS bundle rest)

add_executable(demo_example demo_example.cc)

target_link_libraries(demo_example PRIVATE iceberg::iceberg_bundle_shared
iceberg::iceberg_rest_shared)
target_link_libraries(demo_example
PRIVATE "$<IF:$<TARGET_EXISTS:iceberg::iceberg_bundle_shared>,iceberg::iceberg_bundle_shared,iceberg::iceberg_bundle_static>"
"$<IF:$<TARGET_EXISTS:iceberg::iceberg_rest_shared>,iceberg::iceberg_rest_shared,iceberg::iceberg_rest_static>"
)
8 changes: 6 additions & 2 deletions src/iceberg/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ function(add_iceberg_test test_name)
target_sources(${test_name} PRIVATE ${ARG_SOURCES})

if(ARG_USE_BUNDLE)
target_link_libraries(${test_name} PRIVATE iceberg_bundle_static GTest::gmock_main)
target_link_libraries(${test_name}
PRIVATE "$<IF:$<TARGET_EXISTS:iceberg_bundle_static>,iceberg_bundle_static,iceberg_bundle_shared>"
GTest::gmock_main)
elseif(ARG_USE_DATA)
target_link_libraries(${test_name}
PRIVATE "$<IF:$<TARGET_EXISTS:iceberg_data_static>,iceberg_data_static,iceberg_data_shared>"
GTest::gmock_main)
else()
target_link_libraries(${test_name} PRIVATE iceberg_static GTest::gmock_main)
target_link_libraries(${test_name}
PRIVATE "$<IF:$<TARGET_EXISTS:iceberg_static>,iceberg_static,iceberg_shared>"
GTest::gmock_main)
endif()

if(MSVC_TOOLCHAIN)
Expand Down
Loading