Skip to content

Commit f77eb2f

Browse files
committed
included crypto++ lib
1 parent 84cbb34 commit f77eb2f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

CMakeLists.txt

+13-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ if(NOT expected_POPULATED)
4646
FetchContent_Populate(expected)
4747
endif(NOT expected_POPULATED)
4848

49+
# add crypt++ (+cmake) library
50+
set(CRYPTOPP_BUILD_TESTING Off)
51+
set(CRYPTOPP_INSTALL Off)
52+
53+
if(NOT cryptopp_POPULATED)
54+
FetchContent_Declare(cryptopp
55+
GIT_REPOSITORY https://github.com/abdes/cryptopp-cmake.git
56+
GIT_TAG CRYPTOPP_8_7_0)
57+
FetchContent_Populate(cryptopp)
58+
add_subdirectory(${cryptopp_SOURCE_DIR} ${cryptopp_BINARY_DIR})
59+
endif(NOT cryptopp_POPULATED)
60+
4961
include(CTest)
5062
enable_testing()
5163

@@ -77,7 +89,7 @@ set(LIB_SOURCES
7789
src/big_int.hpp src/big_int.cpp )
7890

7991
add_library(oc-mint-lib ${LIB_SOURCES})
80-
target_link_libraries(oc-mint-lib PUBLIC Crow::Crow)
92+
target_link_libraries(oc-mint-lib PUBLIC Crow::Crow cryptopp::cryptopp)
8193
target_include_directories(oc-mint-lib PUBLIC ${expected_SOURCE_DIR}/include src)
8294

8395
add_executable(${PROJECT_NAME} src/main.cpp)

0 commit comments

Comments
 (0)