From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/1] libcpprestsdk: fix building as a static library
Date: Mon, 12 Feb 2018 17:07:14 +0100 [thread overview]
Message-ID: <20180212170714.6715fcdf@windsurf.lan> (raw)
In-Reply-To: <20180212130016.3054-1-aduskett@gmail.com>
Hello,
Thanks for working on this new version!
On Mon, 12 Feb 2018 08:00:16 -0500, Adam Duskett wrote:
> Use pkg-config to find OpenSSL. This will automatically find any
> dependent libraries and put them in the correct order for linking.
>
> Fixes:
> http://autobuild.buildroot.net/results/1df528254468a5ece2f6fe37b3401e68737beed1
>
> Upstream status: submitted
> https://github.com/Microsoft/cpprestsdk/pull/688
>
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
> Changes v1 -> v2:
> - Now using pkg-config instead of manually moving library search order
> (Thomas)
>
> ...prestsdk-fix-building-as-a-static-library.patch | 42 ++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
> create mode 100644 package/libcpprestsdk/0004-libcpprestsdk-fix-building-as-a-static-library.patch
>
> 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..c80f3f9ca0
> --- /dev/null
> +++ b/package/libcpprestsdk/0004-libcpprestsdk-fix-building-as-a-static-library.patch
> @@ -0,0 +1,45 @@
> +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
Your pull request now has both fixes. Are you sure this is what you
wanted to do ?
> +---
> + 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}")
> +@@ -67,4 +71,4 @@ function(cpprest_find_openssl)
> + # libressl doesn't ship with the cleanup method being used in ws_client_wspp
> + target_compile_definitions(cpprestsdk_openssl_internal INTERFACE -DCPPREST_NO_SSL_LEAK_SUPPRESS)
> + endif()
> +-endfunction()
> +\ No newline at end of file
> ++endfunction()
This last chunk is a spurious and unrelated change.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
prev parent reply other threads:[~2018-02-12 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 13:00 [Buildroot] [PATCH v2 1/1] libcpprestsdk: fix building as a static library Adam Duskett
2018-02-12 16:07 ` Thomas Petazzoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180212170714.6715fcdf@windsurf.lan \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.