Use cryptopp from vendor/ instead of system

This commit is contained in:
Sebastian Messmer 2018-05-19 12:40:20 -07:00
parent 97d2b21930
commit 6dbee297ce
3 changed files with 12 additions and 6 deletions

View File

@ -63,9 +63,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS})
# TODO From Crypto++ 5.7 on, it should support cmake with find_package() instead of find_library().
find_library_with_path(CryptoPP cryptopp CRYPTOPP_LIB_PATH)
target_link_libraries(${PROJECT_NAME} PUBLIC ${CryptoPP} scrypt spdlog)
target_link_libraries(${PROJECT_NAME} PUBLIC scrypt spdlog cryptopp)
target_add_boost(${PROJECT_NAME} filesystem system thread)
target_enable_style_warnings(${PROJECT_NAME})

View File

@ -1,4 +1,12 @@
# Don't build cryptopp test cases
set(BUILD_TESTING OFF)
project(mycryptopp)
add_subdirectory(cryptopp)
set(BUILD_TESTING OFF)
set(BUILD_DOCUMENTATION OFF)
set(BUILD_SHARED OFF)
set(BUILD_STATIC ON)
add_subdirectory(cryptopp EXCLUDE_FROM_ALL)
add_library(cryptopp dummy.cpp)
target_link_libraries(cryptopp PRIVATE cryptopp-static)
target_include_directories(cryptopp SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})

0
vendor/cryptopp/dummy.cpp vendored Normal file
View File