File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,5 +26,7 @@ find_package(iceberg CONFIG REQUIRED COMPONENTS bundle rest)
2626
2727add_executable (demo_example demo_example.cc )
2828
29- target_link_libraries (demo_example PRIVATE iceberg::iceberg_bundle_shared
30- iceberg::iceberg_rest_shared )
29+ target_link_libraries (demo_example
30+ PRIVATE "$<IF :$<TARGET_EXISTS :iceberg ::iceberg_bundle_shared >,iceberg ::iceberg_bundle_shared ,iceberg ::iceberg_bundle_static >"
31+ "$<IF :$<TARGET_EXISTS :iceberg ::iceberg_rest_shared >,iceberg ::iceberg_rest_shared ,iceberg ::iceberg_rest_static >"
32+ )
Original file line number Diff line number Diff line change @@ -46,13 +46,17 @@ function(add_iceberg_test test_name)
4646 target_sources (${test_name} PRIVATE ${ARG_SOURCES} )
4747
4848 if (ARG_USE_BUNDLE)
49- target_link_libraries (${test_name} PRIVATE iceberg_bundle_static GTest::gmock_main )
49+ target_link_libraries (${test_name}
50+ PRIVATE "$<IF :$<TARGET_EXISTS :iceberg_bundle_static >,iceberg_bundle_static ,iceberg_bundle_shared >"
51+ GTest::gmock_main )
5052 elseif (ARG_USE_DATA)
5153 target_link_libraries (${test_name}
5254 PRIVATE "$<IF :$<TARGET_EXISTS :iceberg_data_static >,iceberg_data_static ,iceberg_data_shared >"
5355 GTest::gmock_main )
5456 else ()
55- target_link_libraries (${test_name} PRIVATE iceberg_static GTest::gmock_main )
57+ target_link_libraries (${test_name}
58+ PRIVATE "$<IF :$<TARGET_EXISTS :iceberg_static >,iceberg_static ,iceberg_shared >"
59+ GTest::gmock_main )
5660 endif ()
5761
5862 if (MSVC_TOOLCHAIN)
You can’t perform that action at this time.
0 commit comments