mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-04-27 13:35:06 -06:00
cmake: Only add catch2 library if ENABLE_TESTS is enabled
This commit is contained in:
parent
17f4c52e56
commit
d721cbe29b
18
externals/CMakeLists.txt
vendored
18
externals/CMakeLists.txt
vendored
@ -50,15 +50,17 @@ else()
|
||||
endif()
|
||||
|
||||
# Catch2
|
||||
add_library(catch2 INTERFACE)
|
||||
if(USE_SYSTEM_CATCH2)
|
||||
find_package(Catch2 3.0.0 REQUIRED)
|
||||
else()
|
||||
set(CATCH_INSTALL_DOCS OFF CACHE BOOL "")
|
||||
set(CATCH_INSTALL_EXTRAS OFF CACHE BOOL "")
|
||||
add_subdirectory(catch2)
|
||||
if (ENABLE_TESTS)
|
||||
add_library(catch2 INTERFACE)
|
||||
if(USE_SYSTEM_CATCH2)
|
||||
find_package(Catch2 3.0.0 REQUIRED)
|
||||
else()
|
||||
set(CATCH_INSTALL_DOCS OFF CACHE BOOL "")
|
||||
set(CATCH_INSTALL_EXTRAS OFF CACHE BOOL "")
|
||||
add_subdirectory(catch2)
|
||||
endif()
|
||||
target_link_libraries(catch2 INTERFACE Catch2::Catch2WithMain)
|
||||
endif()
|
||||
target_link_libraries(catch2 INTERFACE Catch2::Catch2WithMain)
|
||||
|
||||
# Crypto++
|
||||
if(USE_SYSTEM_CRYPTOPP)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user