diff --git a/pkg/mac/build-dependencies.sh b/pkg/mac/build-dependencies.sh index 84f48dc..c85b186 100755 --- a/pkg/mac/build-dependencies.sh +++ b/pkg/mac/build-dependencies.sh @@ -194,7 +194,9 @@ if [ ! -f curl-${CURL_VERSION}/.done ]; then CURL_VERSION_=${CURL_VERSION//./_} download_dependency $ROOT_DIR/dependencies.yaml curl pushd curl-${CURL_VERSION} - CFLAGS="-fPIC -arch arm64 -arch x86_64 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \ + # Force the compiler to find the OpenSSL headers instead of the headers in the system path like /usr/local/include/openssl. + cp -rf $PREFIX/include/openssl include/ + CFLAGS="-I$PREFIX/include -fPIC -arch arm64 -arch x86_64 -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \ ./configure --with-ssl=$PREFIX \ --without-nghttp2 \ --without-libidn2 \ diff --git a/pkg/mac/build-pulsar-cpp.sh b/pkg/mac/build-pulsar-cpp.sh index a6849e2..51f1ef3 100755 --- a/pkg/mac/build-pulsar-cpp.sh +++ b/pkg/mac/build-pulsar-cpp.sh @@ -45,12 +45,14 @@ if [ ! -f apache-pulsar-client-cpp-${PULSAR_CPP_VERSION}/.done ]; then ARCHS='arm64;x86_64' cmake . \ + -DCMAKE_CXX_STANDARD=11 \ -DCMAKE_OSX_ARCHITECTURES=${ARCHS} \ -DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=${DEPS_PREFIX} \ -DCMAKE_CXX_FLAGS=-I${DEPS_PREFIX}/include \ + -DOPENSSL_ROOT_DIR=${DEPS_PREFIX} \ -DLINK_STATIC=OFF \ -DBUILD_TESTS=OFF \ -DBUILD_WIRESHARK=OFF \