--- a/pkgconfig/CMakeLists.txt +++ b/pkgconfig/CMakeLists.txt @@ -8,6 +8,11 @@ set(PKGCONFIG_PROJECT_DESCRIPTION "Mbed TLS is a C library that implements cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocols. Its small code footprint makes it suitable for embedded systems.") set(PKGCONFIG_PROJECT_HOMEPAGE_URL "https://www.trustedfirmware.org/projects/mbed-tls/") + set(MBEDTLS_PKGCONFIG_LIBS_PRIVATE "") + if(WIN32) + set(MBEDTLS_PKGCONFIG_LIBS_PRIVATE "-lbcrypt") + endif() + configure_file(mbedcrypto.pc.in mbedcrypto.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mbedcrypto.pc --- a/pkgconfig/mbedcrypto.pc.in +++ b/pkgconfig/mbedcrypto.pc.in @@ -8,3 +8,4 @@ Version: @PROJECT_VERSION@ Cflags: -I"${includedir}" Libs: -L"${libdir}" -lmbedcrypto +Libs.private: @MBEDTLS_PKGCONFIG_LIBS_PRIVATE@