xref: /OK3568_Linux_fs/buildroot/package/bctoolbox/0001-Fix-Libs.private-flags-for-mbedtls.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom b7f14a800bbdad193f45695bc5b8c5173f3882ba Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3*4882a593SmuzhiyunDate: Sun, 10 Feb 2019 17:51:05 +0100
4*4882a593SmuzhiyunSubject: [PATCH] CMakeLists.txt: fix mbedtls libraries in bctoolbox.pc
5*4882a593SmuzhiyunMIME-Version: 1.0
6*4882a593SmuzhiyunContent-Type: text/plain; charset=UTF-8
7*4882a593SmuzhiyunContent-Transfer-Encoding: 8bit
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunbctoolbox.pc should not contain the full libraries path, path should be
10*4882a593Smuzhiyungiven by -L and library names by -l
11*4882a593SmuzhiyunSo sent back the fix already suggested by Jörg Krause in
12*4882a593Smuzhiyunhttps://github.com/BelledonneCommunications/bctoolbox/pull/4
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSigned-off-by: Jörg Krause <joerg.krause@embedded.rocks>
15*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
16*4882a593Smuzhiyun[Upstream status:
17*4882a593Smuzhiyunhttps://github.com/BelledonneCommunications/bctoolbox/pull/7]
18*4882a593Smuzhiyun---
19*4882a593Smuzhiyun CMakeLists.txt | 5 ++---
20*4882a593Smuzhiyun 1 file changed, 2 insertions(+), 3 deletions(-)
21*4882a593Smuzhiyun
22*4882a593Smuzhiyundiff --git a/CMakeLists.txt b/CMakeLists.txt
23*4882a593Smuzhiyunindex 29f3eb6..b2f26c2 100644
24*4882a593Smuzhiyun--- a/CMakeLists.txt
25*4882a593Smuzhiyun+++ b/CMakeLists.txt
26*4882a593Smuzhiyun@@ -101,9 +101,8 @@ else()
27*4882a593Smuzhiyun endif()
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun if(MBEDTLS_FOUND)
30*4882a593Smuzhiyun-	get_filename_component(mbedtls_library_path "${MBEDTLS_LIBRARIES}" PATH)
31*4882a593Smuzhiyun-	string(REPLACE ";" " " MBEDTLS_LIBRARIES_STR "${MBEDTLS_LIBRARIES}")
32*4882a593Smuzhiyun-	set(LIBS_PRIVATE "${LIBS_PRIVATE} ${MBEDTLS_LIBRARIES_STR}")
33*4882a593Smuzhiyun+	get_filename_component(mbedtls_library_path "${MBEDTLS_LIBRARY}" PATH)
34*4882a593Smuzhiyun+	set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${mbedtls_library_path} -lmbedtls -lmbedcrypto -lmbedx509")
35*4882a593Smuzhiyun endif()
36*4882a593Smuzhiyun if(POLARSSL_FOUND)
37*4882a593Smuzhiyun 	get_filename_component(polarssl_library_path "${POLARSSL_LIBRARIES}" PATH)
38