xref: /OK3568_Linux_fs/buildroot/package/xerces/0001-fix-static-linking-with-curl.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 26e3f1440bbc75c704fc93ff43a2abbfbe4c0203 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Thu, 11 Oct 2018 22:56:50 +0200
4Subject: [PATCH] fix static linking with curl
5
6When curl is statically built with openssl support, xerces needs to
7link with openssl libraries so use pkg_check_modules to get any
8needed dependencies
9
10Fixes:
11 - http://autobuild.buildroot.org/results/29ca90fff2c8e38f2edf7240eca3aa3fe7397c45
12
13Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
14---
15 cmake/XercesNetAccessorSelection.cmake | 8 +++++++-
16 1 file changed, 7 insertions(+), 1 deletion(-)
17
18diff --git a/cmake/XercesNetAccessorSelection.cmake b/cmake/XercesNetAccessorSelection.cmake
19index 7a63f1f6b..e90fcf034 100644
20--- a/cmake/XercesNetAccessorSelection.cmake
21+++ b/cmake/XercesNetAccessorSelection.cmake
22@@ -31,7 +31,13 @@ if(network)
23
24   # Requires select() which is UNIX only
25   if(UNIX)
26-    find_package(CURL)
27+    find_package(PkgConfig)
28+    if (PkgConfig_FOUND)
29+      pkg_check_modules(CURL libcurl)
30+      if (NOT CURL_FOUND)
31+        find_package(CURL)
32+      endif()
33+    endif()
34     if(CURL_FOUND)
35       list(APPEND netaccessors curl)
36     endif()
37--
382.17.1
39
40