Skip to content

Commit

Permalink
Merge pull request #10 from mellinoe/apple_silicon_support
Browse files Browse the repository at this point in the history
Apple silicon support
  • Loading branch information
mellinoe authored Feb 12, 2022
2 parents 0a3f0c0 + e38e867 commit a48fe74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion build-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ scriptPath="`dirname \"$0\"`"
cimguiPath=$scriptPath/cimgui

_CMakeBuildType=Debug
_CMakeOsxArchitectures=

while :; do
if [ $# -le 0 ]; then
Expand All @@ -18,6 +19,10 @@ while :; do
release|-release)
_CMakeBuildType=Release
;;
-osx-architectures)
_CMakeOsxArchitectures=$2
shift
;;
*)
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
esac
Expand All @@ -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
6 changes: 5 additions & 1 deletion ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a48fe74

Please sign in to comment.