From 39525227fd61e690926a41ee2be69f269cabab91 Mon Sep 17 00:00:00 2001 From: Gulliver Date: Mon, 23 Jan 2023 18:18:10 +0100 Subject: [PATCH] included crypto++ lib --- CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b00618a..aea79a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,17 @@ if(NOT expected_POPULATED) FetchContent_Populate(expected) endif(NOT expected_POPULATED) + +# add crypt++ (+cmake) library +FetchContent_Declare(cryptopp +GIT_REPOSITORY https://github.com/abdes/cryptopp-cmake.git +GIT_TAG CRYPTOPP_8_7_0) + +if(NOT cryptopp_POPULATED) + FetchContent_Populate(cryptopp) + add_subdirectory(${cryptopp_SOURCE_DIR} ${cryptopp_BINARY_DIR}) +endif(NOT cryptopp_POPULATED) + include(CTest) enable_testing() @@ -77,7 +88,7 @@ set(LIB_SOURCES src/big_int.hpp src/big_int.cpp ) add_library(oc-mint-lib ${LIB_SOURCES}) -target_link_libraries(oc-mint-lib PUBLIC Crow::Crow) +target_link_libraries(oc-mint-lib PUBLIC Crow::Crow cryptopp::cryptopp) target_include_directories(oc-mint-lib PUBLIC ${expected_SOURCE_DIR}/include src) add_executable(${PROJECT_NAME} src/main.cpp)