This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new fd7a5bf  Fixing the mac build if you use a different openssl (#9165)
fd7a5bf is described below

commit fd7a5bf5ccb35350081e9e47c323824f066534d6
Author: phijohns-tibco <[email protected]>
AuthorDate: Wed Jan 20 15:34:24 2021 -0600

    Fixing the mac build if you use a different openssl (#9165)
    
    Fixes #9155
    
    ### Motivation
    When I attempted to build the c library on macosx with openssl 1.1.1i it 
failed with linkage errors. I tracked those errors down to the fact that the 
OPENSLL_ROOT_DIR was incorrect outside of mac vms used by the upstream.
    
    ### Modifications
    
    I set the default value first and then reset it only if running on mac.
    
    ### Verifying this change
    
    This change is a trivial rework / code cleanup without any test coverage.
---
 pulsar-client-cpp/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pulsar-client-cpp/CMakeLists.txt b/pulsar-client-cpp/CMakeLists.txt
index 4716dd7..d4fdb8e 100644
--- a/pulsar-client-cpp/CMakeLists.txt
+++ b/pulsar-client-cpp/CMakeLists.txt
@@ -73,6 +73,8 @@ endif(NOT LOG_CATEGORY_NAME)
 
 add_definitions(-DLOG_CATEGORY_NAME=${LOG_CATEGORY_NAME} -DBUILDING_PULSAR 
-DBOOST_ALL_NO_LIB -DBOOST_ALLOW_DEPRECATED_HEADERS)
 
+set(OPENSSL_ROOT_DIR /usr/lib64/)
+
 ### This part is to find and keep SSL dynamic libs in 
RECORD_OPENSSL_SSL_LIBRARY and RECORD_OPENSSL_CRYPTO_LIBRARY
 ### After find the libs, will unset related cache, and will not affact another 
same call to find_package.
 if (APPLE)
@@ -80,7 +82,6 @@ if (APPLE)
     set(OPENSSL_ROOT_DIR /usr/local/opt/openssl/)
 endif ()
 
-set(OPENSSL_ROOT_DIR /usr/lib64/)
 set(OPENSSL_USE_STATIC_LIBS FALSE)
 find_package(OpenSSL REQUIRED)
 set(RECORD_OPENSSL_SSL_LIBRARY ${OPENSSL_SSL_LIBRARY})

Reply via email to