2017-05-08 23:03:33 +03:00
|
|
|
#!/bin/bash
|
2019-12-22 23:45:42 +03:00
|
|
|
set -Eeuo pipefail
|
2018-10-06 18:05:09 +03:00
|
|
|
|
2017-05-08 23:03:33 +03:00
|
|
|
echo "### Building libnvim"
|
2019-12-22 23:45:42 +03:00
|
|
|
pushd "$(dirname "${BASH_SOURCE[0]}")/.." > /dev/null
|
|
|
|
|
|
|
|
readonly deployment_target_file="./resources/macos_deployment_target.txt"
|
|
|
|
readonly deployment_target=$(cat ${deployment_target_file})
|
2017-05-08 23:03:33 +03:00
|
|
|
|
2018-06-10 23:12:00 +03:00
|
|
|
# Brew's gettext does not get sym-linked to PATH
|
|
|
|
export PATH=/usr/local/opt/gettext/bin:$PATH
|
|
|
|
|
2019-12-22 23:45:42 +03:00
|
|
|
pushd NvimView/neovim
|
|
|
|
ln -sf ../local.mk .
|
|
|
|
|
|
|
|
# Use custom gettext source only when building libnvim => not in local.mk which is also used to build the full nvim
|
|
|
|
# to get the full runtime.
|
|
|
|
make \
|
|
|
|
CFLAGS="-mmacosx-version-min=${deployment_target}" \
|
|
|
|
CXXFLAGS="-mmacosx-version-min=${deployment_target}" \
|
|
|
|
MACOSX_DEPLOYMENT_TARGET=${deployment_target} \
|
|
|
|
CMAKE_EXTRA_FLAGS="-DGETTEXT_SOURCE=CUSTOM -DCMAKE_OSX_DEPLOYMENT_TARGET=${deployment_target} -DCMAKE_CXX_COMPILER=$(xcrun -find c++)" \
|
|
|
|
DEPS_CMAKE_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=${deployment_target} -DCMAKE_CXX_COMPILER=$(xcrun -find c++)" \
|
|
|
|
libnvim
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
popd > /dev/null
|
2017-05-08 23:03:33 +03:00
|
|
|
echo "### Built libnvim"
|