2023-08-01 13:54:17 +08:00
|
|
|
find_package(Boost REQUIRED COMPONENTS serialization)
|
|
|
|
|
|
|
|
add_library(Encrypt
|
|
|
|
Encrypt.h Encrypt.cpp
|
|
|
|
MessageDigest.h MessageDigest.cpp
|
|
|
|
SecureHashAlgorithm.h SecureHashAlgorithm.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(Encrypt
|
|
|
|
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
|
2024-10-29 21:51:37 +08:00
|
|
|
PRIVATE ${MBEDTLS_INCLUDE_DIR}
|
2023-08-01 13:54:17 +08:00
|
|
|
PRIVATE ${Boost_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
2024-10-29 21:51:37 +08:00
|
|
|
# target_link_libraries(Encrypt
|
|
|
|
# PUBLIC mbedtls-${MBEDTLS_VERSION}
|
|
|
|
# )
|
2023-08-01 13:54:17 +08:00
|
|
|
|
|
|
|
if(UNIX)
|
|
|
|
target_compile_options(Encrypt
|
|
|
|
PRIVATE -fPIC
|
|
|
|
)
|
|
|
|
endif()
|