rdhabalia commented on a change in pull request #514: Static link dependency 
libraries for C++ client lib and Python wrapper
URL: https://github.com/apache/incubator-pulsar/pull/514#discussion_r125755406
 
 

 ##########
 File path: pulsar-client-cpp/CMakeLists.txt
 ##########
 @@ -32,24 +34,33 @@ endif(NOT LOG_CATEGORY_NAME)
 
 add_definitions(-DLOG_CATEGORY_NAME=${LOG_CATEGORY_NAME})
 
+SET(Boost_USE_STATIC_LIBS   ON)
 find_package(Boost REQUIRED COMPONENTS program_options filesystem regex
-                                        thread system python
-            )
+                                        thread system python)
 find_package(PythonLibs REQUIRED)
+
+SET(OPENSSL_USE_STATIC_LIBS TRUE)
 find_package(OpenSSL REQUIRED)
-find_package(ZLIB REQUIRED)
-if (NOT PROTOBUF_LIBRARIES)
-  find_package(ProtoBuf QUIET)
-  if (NOT ProtoBuf_FOUND)
-    find_library(PROTOBUF_LIBRARIES protobuf)
-  endif (NOT ProtoBuf_FOUND)
-endif (NOT PROTOBUF_LIBRARIES)
-find_library(LOG4CXX_LIBRARY_PATH log4cxx)
-find_library(CURL_LIBRARY_PATH curl)
-find_path(LOG4CXX_INCLUDE_PATH log4cxx/logger.h)
+find_library(ZLIB_LIBRARY_PATH REQUIRED NAMES libz.a z)
+
+find_library(PROTO_LIBRARIES NAMES libprotobuf.a)
+find_library(CURL_LIBRARY_PATH NAMES libcurl.a curl)
 find_path(GTEST_INCLUDE_PATH gtest/gtest.h)
 find_path(JSON_INCLUDE_PATH jsoncpp)
-find_library(LIB_JSON jsoncpp)
+find_library(LIB_JSON NAMES libjsoncpp.a)
+
+find_library(LOG4CXX_LIBRARY_PATH NAMES liblog4cxx.a)
 
 Review comment:
   `liblog4cxx.a` is this correct?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to