Kylin/Encrypt/CMakeLists.txt
2024-11-25 18:42:06 +08:00

26 lines
500 B
CMake

find_package(Boost REQUIRED COMPONENTS serialization)
find_package(MbedTLS REQUIRED)
add_library(Encrypt
Encrypt.h Encrypt.cpp
MessageDigest.h MessageDigest.cpp
SecureHashAlgorithm.h SecureHashAlgorithm.cpp
)
target_include_directories(Encrypt
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${Boost_INCLUDE_DIRS}
)
target_link_libraries(Encrypt
PRIVATE MbedTLS::mbedtls
PRIVATE MbedTLS::mbedcrypto
)
if(UNIX)
target_compile_options(Encrypt
PRIVATE -fPIC
)
endif()