forked from mpusz/mp-units
Linking with Conan targets only when they exists (resolves #98)
This commit is contained in:
@@ -26,7 +26,7 @@ function(add_metabench_test target name erb_path range)
|
||||
target_compile_features(${target} PUBLIC cxx_std_20)
|
||||
target_link_libraries(${target}
|
||||
PUBLIC
|
||||
CONAN_PKG::range-v3
|
||||
$<IF:$<TARGET_EXISTS:CONAN_PKG::range-v3>, CONAN_PKG::range-v3, range-v3::range-v3>
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
|
||||
@@ -33,7 +33,7 @@ add_executable(unit_tests_runtime
|
||||
target_link_libraries(unit_tests_runtime
|
||||
PRIVATE
|
||||
mp::units
|
||||
CONAN_PKG::Catch2
|
||||
$<IF:$<TARGET_EXISTS:CONAN_PKG::Catch2>, CONAN_PKG::Catch2, Catch2::Catch2>
|
||||
)
|
||||
|
||||
include(lib/cmake/Catch2/Catch)
|
||||
|
||||
Reference in New Issue
Block a user