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} PUBLIC ${MBEDTLS_INCLUDE_DIR} PRIVATE ${Boost_INCLUDE_DIRS} ) target_link_directories(Encrypt PUBLIC ${MBEDTLS_LIBRARY_DIRS} ) target_link_libraries(Encrypt PRIVATE mbedtls PRIVATE mbedcrypto ) if(UNIX) target_compile_options(Encrypt PRIVATE -fPIC ) endif()