externals: allow user to use system cryptopp (#7105)
This commit is contained in:
parent
ac9d72a95c
commit
8d811913a5
3 changed files with 50 additions and 5 deletions
16
externals/CMakeLists.txt
vendored
16
externals/CMakeLists.txt
vendored
|
@ -46,11 +46,17 @@ set(CATCH_INSTALL_EXTRAS OFF CACHE BOOL "")
|
|||
add_subdirectory(catch2)
|
||||
|
||||
# Crypto++
|
||||
set(CRYPTOPP_BUILD_DOCUMENTATION OFF CACHE BOOL "")
|
||||
set(CRYPTOPP_BUILD_TESTING OFF CACHE BOOL "")
|
||||
set(CRYPTOPP_INSTALL OFF CACHE BOOL "")
|
||||
set(CRYPTOPP_SOURCES "${CMAKE_SOURCE_DIR}/externals/cryptopp" CACHE STRING "")
|
||||
add_subdirectory(cryptopp-cmake)
|
||||
if(USE_SYSTEM_CRYPTOPP)
|
||||
find_package(cryptopp REQUIRED)
|
||||
add_library(cryptopp INTERFACE)
|
||||
target_link_libraries(cryptopp INTERFACE cryptopp::cryptopp)
|
||||
else()
|
||||
set(CRYPTOPP_BUILD_DOCUMENTATION OFF CACHE BOOL "")
|
||||
set(CRYPTOPP_BUILD_TESTING OFF CACHE BOOL "")
|
||||
set(CRYPTOPP_INSTALL OFF CACHE BOOL "")
|
||||
set(CRYPTOPP_SOURCES "${CMAKE_SOURCE_DIR}/externals/cryptopp" CACHE STRING "")
|
||||
add_subdirectory(cryptopp-cmake)
|
||||
endif()
|
||||
|
||||
# dds-ktx
|
||||
add_library(dds-ktx INTERFACE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue