This is an automated email from the ASF dual-hosted git repository.
mmerli 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 24d20aa When linking statically a the Python wrapper on Macos, also
include libicu (#3647)
24d20aa is described below
commit 24d20aab45f894cb620f19f24c1d97270ca4bac9
Author: Matteo Merli <[email protected]>
AuthorDate: Fri Feb 22 11:49:47 2019 -0800
When linking statically a the Python wrapper on Macos, also include libicu
(#3647)
---
pulsar-client-cpp/python/CMakeLists.txt | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/pulsar-client-cpp/python/CMakeLists.txt
b/pulsar-client-cpp/python/CMakeLists.txt
index 5b0971d..3eb7981 100644
--- a/pulsar-client-cpp/python/CMakeLists.txt
+++ b/pulsar-client-cpp/python/CMakeLists.txt
@@ -53,6 +53,15 @@ set(PYTHON_WRAPPER_LIBS ${Boost_PYTHON_LIBRARY}
${Boost_PYTHON3_LIBRARY}
if (APPLE)
set(PYTHON_WRAPPER_LIBS ${PYTHON_LIBRARIES} ${PYTHON_WRAPPER_LIBS}
${Boost_PYTHON27-MT_LIBRARY_RELEASE}
${Boost_PYTHON37-MT_LIBRARY_RELEASE})
+
+ if (LINK_STATIC)
+ # When linking statically on MacOS, include also libicu since it's now
required by boost::regex
+ find_library(ICU_DATA REQUIRED NAMES libicudata.a PATHS
/usr/local/opt/icu4c/lib)
+ find_library(ICU_I18N REQUIRED NAMES libicui18n.a PATHS
/usr/local/opt/icu4c/lib)
+ find_library(ICU_UUC REQUIRED NAMES libicuuc.a PATHS
/usr/local/opt/icu4c/lib)
+
+ set(ICU_LIBS ${ICU_DATA} ${ICU_I18N} ${ICU_UUC})
+ endif ()
endif()
message(STATUS "Using Boost Python libs: ${PYTHON_WRAPPER_LIBS}")
@@ -62,7 +71,7 @@ if (NOT PYTHON_WRAPPER_LIBS)
endif ()
if (APPLE)
- target_link_libraries(_pulsar -Wl,-all_load pulsarStatic
${PYTHON_WRAPPER_LIBS} ${COMMON_LIBS})
+ target_link_libraries(_pulsar -Wl,-all_load pulsarStatic
${PYTHON_WRAPPER_LIBS} ${COMMON_LIBS} ${ICU_LIBS})
else ()
set (CMAKE_SHARED_LINKER_FLAGS " -static-libgcc -static-libstdc++")
target_link_libraries(_pulsar pulsarStatic ${PYTHON_WRAPPER_LIBS}
${COMMON_LIBS})