You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/11/15 21:05:44 UTC
[20/31] qpid-proton git commit: PROTON-1662: Make sure we link with
pthreads for both openssl and cyrus sasl plugins
PROTON-1662: Make sure we link with pthreads for both openssl and cyrus sasl plugins
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/705f8355
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/705f8355
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/705f8355
Branch: refs/heads/go1
Commit: 705f83550f9e143db25d1725170bc8837220a92b
Parents: 2360187
Author: Andrew Stitcher <as...@apache.org>
Authored: Mon Oct 30 09:05:57 2017 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Mon Oct 30 09:05:57 2017 -0400
----------------------------------------------------------------------
proton-c/CMakeLists.txt | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/705f8355/proton-c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
index c420649..b6ce4a7 100644
--- a/proton-c/CMakeLists.txt
+++ b/proton-c/CMakeLists.txt
@@ -27,6 +27,8 @@ add_custom_target(doc DEPENDS docs)
# Set the default SSL/TLS implementation
find_package(OpenSSL)
+set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+find_package(Threads)
find_package(PythonInterp REQUIRED)
find_package(SWIG)
# FindSwig.cmake "forgets" make its outputs advanced like a good citizen
@@ -52,15 +54,15 @@ if(PN_WINAPI)
set(ssl_impl schannel)
set(ssl_providers "'none','schannel','openssl'")
else(PN_WINAPI)
- if (OPENSSL_FOUND)
+ if (OPENSSL_FOUND AND Threads_FOUND)
set(ssl_impl openssl)
- endif (OPENSSL_FOUND)
+ endif ()
set(ssl_providers "'none','openssl'")
endif(PN_WINAPI)
set(SSL_IMPL ${ssl_impl} CACHE STRING "Library to use for SSL/TLS support. Valid values: ${ssl_providers}")
set(sasl_providers cyrus none)
-if (CYRUSSASL_FOUND)
+if (CYRUSSASL_FOUND AND Threads_FOUND)
set (sasl_impl cyrus)
else ()
set (sasl_impl none)
@@ -109,7 +111,7 @@ endif(PN_WINAPI)
if (SASL_IMPL STREQUAL cyrus)
set(pn_sasl_impl src/sasl/sasl.c src/sasl/default_sasl.c src/sasl/cyrus_sasl.c)
include_directories (${CYRUS_SASL_INCLUDE_DIR})
- set(SASL_LIB ${CYRUS_SASL_LIBRARY} -lpthread)
+ set(SASL_LIB ${CYRUS_SASL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
elseif (SASL_IMPL STREQUAL none)
set(pn_sasl_impl src/sasl/sasl.c src/sasl/default_sasl.c src/sasl/cyrus_stub.c)
endif ()
@@ -127,7 +129,7 @@ endif()
if (SSL_IMPL STREQUAL openssl)
set (pn_ssl_impl src/ssl/openssl.c)
include_directories (${OPENSSL_INCLUDE_DIR})
- set (SSL_LIB ${OPENSSL_LIBRARIES})
+ set (SSL_LIB ${OPENSSL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
elseif (SSL_IMPL STREQUAL schannel)
set (pn_ssl_impl src/ssl/schannel.c)
set (SSL_LIB Crypt32.lib Secur32.lib)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org