File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 7070 clang++ win-examples/example.cc -o dynamic.out -std=c++11 -arch ${{ matrix.arch }} -I $PULSAR_DIR/include -L $PULSAR_DIR/lib -Wl,-rpath $PULSAR_DIR/lib -lpulsar
7171 ./dynamic.out
7272 echo "Build with static library"
73- clang++ win-examples/example.cc -o static.out -std=c++11 -arch ${{ matrix.arch }} -I $PULSAR_DIR/include $PULSAR_DIR/lib/libpulsarwithdeps.a -framework SystemConfiguration -framework CoreServices -framework CoreFoundation
73+ clang++ win-examples/example.cc -o static.out -std=c++11 -arch ${{ matrix.arch }} -I $PULSAR_DIR/include $PULSAR_DIR/lib/libpulsarwithdeps.a
7474 ./static.out
7575
7676 check-completion :
Original file line number Diff line number Diff line change 2121set -e
2222cd ` dirname $0 ` /../..
2323
24+ if [[ -z $ARCH ]]; then
25+ ARCH=$( uname -m)
26+ echo " Use default ARCH: $ARCH "
27+ fi
2428if [[ $ARCH == " x86_64" ]]; then
2529 export VCPKG_TRIPLET=x64-osx
26- cp -f vcpkg-triplets/x64-osx.cmake vcpkg/triplets/x64-osx.cmake
2730elif [[ $ARCH == " arm64" ]]; then
2831 export VCPKG_TRIPLET=arm64-osx
29- cp -f vcpkg-triplets/arm64-osx.cmake vcpkg/triplets/community/arm64-osx.cmake
3032else
3133 echo " Invalid ARCH: $ARCH "
3234 exit 1
3335fi
34- CMAKE_OSX_ARCHITECTURES=$ARCH
36+
37+ # Apply the patch to disable IPv6 when building curl, otherwise curl will depend on some
38+ # frameworks (CoreFoundation, CoreServices, SystemConfiguration) that cannot be bundled
39+ # into the static library `libpulsarwithdeps.a`.
40+ # It requires the extra link options like `-framework CoreFoundation -framework CoreServices -framework SystemConfiguration`.
41+ sed -i.bak ' s/set(OPTIONS "")/set(OPTIONS -DENABLE_IPV6=OFF)/' vcpkg/ports/curl/portfile.cmake
3542
3643INSTALL_DIR=$PWD /pkg/mac/.install
3744set -x
3845cmake -B build-osx \
3946 -DINTEGRATE_VCPKG=ON \
47+ -DVCPKG_OVERLAY_TRIPLETS=$PWD /vcpkg-triplets \
4048 -DVCPKG_TARGET_TRIPLET=$VCPKG_TRIPLET \
41- -DCMAKE_OSX_ARCHITECTURES=$CMAKE_OSX_ARCHITECTURES \
49+ -DCMAKE_OSX_ARCHITECTURES=$ARCH \
4250 -DCMAKE_BUILD_TYPE=Release \
4351 -DBUILD_TESTS=OFF \
4452 -DBUILD_PERF_TOOLS=OFF \
You can’t perform that action at this time.
0 commit comments