From b7f14a800bbdad193f45695bc5b8c5173f3882ba Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 10 Feb 2019 17:51:05 +0100 Subject: [PATCH] CMakeLists.txt: fix mbedtls libraries in bctoolbox.pc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bctoolbox.pc should not contain the full libraries path, path should be given by -L and library names by -l So sent back the fix already suggested by Jörg Krause in https://github.com/BelledonneCommunications/bctoolbox/pull/4 Signed-off-by: Jörg Krause Signed-off-by: Fabrice Fontaine [Upstream status: https://github.com/BelledonneCommunications/bctoolbox/pull/7] --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 29f3eb6..b2f26c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,9 +101,8 @@ else() endif() if(MBEDTLS_FOUND) - get_filename_component(mbedtls_library_path "${MBEDTLS_LIBRARIES}" PATH) - string(REPLACE ";" " " MBEDTLS_LIBRARIES_STR "${MBEDTLS_LIBRARIES}") - set(LIBS_PRIVATE "${LIBS_PRIVATE} ${MBEDTLS_LIBRARIES_STR}") + get_filename_component(mbedtls_library_path "${MBEDTLS_LIBRARY}" PATH) + set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${mbedtls_library_path} -lmbedtls -lmbedcrypto -lmbedx509") endif() if(POLARSSL_FOUND) get_filename_component(polarssl_library_path "${POLARSSL_LIBRARIES}" PATH)