2023-02-07 15:09:08 -07:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
|
|
|
|
export MACOSX_DEPLOYMENT_TARGET
|
2023-04-09 11:31:13 -07:00
|
|
|
cmake -S cmake.deps -B .deps -G Ninja \
|
2024-01-27 11:10:41 -07:00
|
|
|
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
|
2023-04-09 11:31:13 -07:00
|
|
|
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
|
|
|
|
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
|
|
|
|
-D CMAKE_FIND_FRAMEWORK=NEVER
|
2023-02-07 15:09:08 -07:00
|
|
|
cmake --build .deps
|
2023-04-09 11:31:13 -07:00
|
|
|
cmake -B build -G Ninja \
|
2024-01-27 11:10:41 -07:00
|
|
|
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
|
2023-04-09 11:31:13 -07:00
|
|
|
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
|
|
|
|
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
|
2023-12-26 14:46:10 -07:00
|
|
|
-D ENABLE_LIBINTL=OFF \
|
2023-04-09 11:31:13 -07:00
|
|
|
-D CMAKE_FIND_FRAMEWORK=NEVER
|
2023-02-07 15:09:08 -07:00
|
|
|
cmake --build build
|
|
|
|
# Make sure we build everything for M1 as well
|
2023-04-22 13:58:14 -07:00
|
|
|
for macho in build/bin/* build/lib/nvim/parser/*.so; do
|
2023-02-07 15:09:08 -07:00
|
|
|
lipo -info "$macho" | grep -q arm64 || exit 1
|
|
|
|
done
|
2023-04-22 13:58:14 -07:00
|
|
|
cpack --config build/CPackConfig.cmake
|