hc
2024-08-16 94ba65e25ce534ec0515708c9e0835242345bc7b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From b7f14a800bbdad193f45695bc5b8c5173f3882ba Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
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 <joerg.krause@embedded.rocks>
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[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)