Make set_paths.sh work on x86_64 and arm64.
authorCarl Hetherington <cth@carlh.net>
Sun, 4 Feb 2024 11:21:06 +0000 (12:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 4 Feb 2024 11:21:06 +0000 (12:21 +0100)
platform/osx/set_paths.sh

index 91d67ba940dd023afdf26ff53a797c57e2df683c..65fcdedf37f8a3cc60d314390fffcb702d99ce18 100644 (file)
@@ -1,5 +1,9 @@
 base=$HOME/workspace
-env=$HOME/osx-environment/x86_64/10.10
+if [[ "$(uname -m)" == arm64 ]]; then
+       env=$HOME/osx-environment/arm64/11.0
+else
+       env=$HOME/osx-environment/x86_64/10.10
+fi
 sdk=$HOME/SDK
 
 export CPPFLAGS= LDFLAGS="-L$base/lib -L$env/lib -isysroot $sdk/MacOSX11.0.sdk -arch x86_64"