diff --git a/build-native.sh b/build-native.sh index bcfca9a..e0207ae 100755 --- a/build-native.sh +++ b/build-native.sh @@ -4,6 +4,7 @@ scriptPath="`dirname \"$0\"`" cimguiPath=$scriptPath/cimgui _CMakeBuildType=Debug +_CMakeOsxArchitectures= while :; do if [ $# -le 0 ]; then @@ -18,6 +19,10 @@ while :; do release|-release) _CMakeBuildType=Release ;; + -osx-architectures) + _CMakeOsxArchitectures=$2 + shift + ;; *) __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1" esac @@ -27,6 +32,6 @@ done mkdir -p $cimguiPath/build/$_CMakeBuildType pushd $cimguiPath/build/$_CMakeBuildType -cmake ../.. -DCMAKE_BUILD_TYPE=$_CMakeBuildType +cmake ../.. -DCMAKE_OSX_ARCHITECTURES="$_CMakeOsxArchitectures" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_BUILD_TYPE=$_CMakeBuildType make popd diff --git a/ci-build.sh b/ci-build.sh index 205cb8f..de13e5d 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -2,4 +2,8 @@ scriptPath="`dirname \"$0\"`" -$scriptPath/build-native.sh release +if [[ "$OSTYPE" == "darwin"* ]]; then + $scriptPath/build-native.sh release -osx-architectures 'arm64;x86_64' +else + $scriptPath/build-native.sh release +fi