From ddffa49a42e80ee631b4fe6e0957608f5c099209 Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Mon, 4 Nov 2024 17:46:31 +0800 Subject: [PATCH] change lib config. --- Encrypt/CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Encrypt/CMakeLists.txt b/Encrypt/CMakeLists.txt index bb5c6d0..e929cc6 100644 --- a/Encrypt/CMakeLists.txt +++ b/Encrypt/CMakeLists.txt @@ -8,13 +8,19 @@ add_library(Encrypt target_include_directories(Encrypt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} - PRIVATE ${MBEDTLS_INCLUDE_DIR} + PUBLIC ${MBEDTLS_INCLUDE_DIR} PRIVATE ${Boost_INCLUDE_DIRS} ) -# target_link_libraries(Encrypt -# PUBLIC mbedtls-${MBEDTLS_VERSION} -# ) +target_link_directories(Encrypt + PUBLIC ${MBEDTLS_LIBRARY_DIRS} +) + +target_link_libraries(Encrypt + PRIVATE mbedtls + PRIVATE mbedcrypto + +) if(UNIX) target_compile_options(Encrypt