diff options
author | Adam Duskett <aduskett@gmail.com> | 2018-02-12 12:23:50 -0500 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-02-13 23:13:52 +0100 |
commit | d2f0a9bba400c9c623da0d34d1e58341b16241a2 (patch) | |
tree | 462a6eaff75ed93217ace51c255cfb85208536c9 /package/libcpprestsdk/0004-libcpprestsdk-fix-building-as-a-static-library.patch | |
parent | 2b0ca5749cde19ab456c80de133a0bd5f7dc5069 (diff) | |
download | buildroot-d2f0a9bba400c9c623da0d34d1e58341b16241a2.tar.gz buildroot-d2f0a9bba400c9c623da0d34d1e58341b16241a2.zip |
libcpprestsdk: fix building as a static library
Use pkg-config to find OpenSSL. This will automatically find any
dependent libraries and put them in the correct order for linking.
Upstream status: submitted
https://github.com/Microsoft/cpprestsdk/pull/688
Fixes:
http://autobuild.buildroot.net/results/be9e8d1717968a0ff8f01f7fadfa79825ac88b94/
Signed-off-by: Adam Duskett <aduskett@gmail.com>
Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/libcpprestsdk/0004-libcpprestsdk-fix-building-as-a-static-library.patch')
-rw-r--r-- | package/libcpprestsdk/0004-libcpprestsdk-fix-building-as-a-static-library.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/package/libcpprestsdk/0004-libcpprestsdk-fix-building-as-a-static-library.patch b/package/libcpprestsdk/0004-libcpprestsdk-fix-building-as-a-static-library.patch new file mode 100644 index 0000000000..de900178d5 --- /dev/null +++ b/package/libcpprestsdk/0004-libcpprestsdk-fix-building-as-a-static-library.patch @@ -0,0 +1,38 @@ +From 8a9c3db14a390c0a8788405e52e9b8737a430191 Mon Sep 17 00:00:00 2001 +From: Adam Duskett <aduskett@gmail.com> +Date: Mon, 12 Feb 2018 07:49:34 -0500 +Subject: [PATCH] libcpprestsdk: fix building as a static library + +Use pkg-config to find OpenSSL. This will automatically find any +dependent libraries and put them in the correct order for linking. + +Upstream status: submitted +https://github.com/Microsoft/cpprestsdk/pull/688 + +Signed-off-by: Adam Duskett <aduskett@gmail.com> +--- + Release/cmake/cpprest_find_openssl.cmake | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/Release/cmake/cpprest_find_openssl.cmake b/Release/cmake/cpprest_find_openssl.cmake +index 0b49a7e..2be8afb 100644 +--- a/Release/cmake/cpprest_find_openssl.cmake ++++ b/Release/cmake/cpprest_find_openssl.cmake +@@ -41,8 +41,12 @@ function(cpprest_find_openssl) + # This should prevent linking against the system provided 0.9.8y + set(_OPENSSL_VERSION "") + endif() +- find_package(OpenSSL 1.0.0 REQUIRED) +- ++ if(UNIX) ++ find_package(PkgConfig REQUIRED) ++ pkg_search_module(OPENSSL openssl REQUIRED) ++ else() ++ find_package(OpenSSL 1.0.0 REQUIRED) ++ endif() + INCLUDE(CheckCXXSourceCompiles) + set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") + set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}") +-- +2.14.3 + |