diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-04 12:39:38 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-02-04 12:39:38 +0100 |
| commit | 0dc4260daa5ce2f2c3fd6324a3995681729de102 (patch) | |
| tree | 6f8bc62815a258af7971848ce4d1b2d4d5e4a255 | |
| parent | 437667a37951ee4c5146a5755f70d434fe98d039 (diff) | |
Allow setting paths for a build with a workspace directory and a provided SDK, or the local default.
| -rw-r--r-- | platform/osx/set_paths.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/platform/osx/set_paths.sh b/platform/osx/set_paths.sh index 07890394c..24baa6cd6 100644 --- a/platform/osx/set_paths.sh +++ b/platform/osx/set_paths.sh @@ -1,4 +1,12 @@ -base=$HOME/workspace +SDK=$1 +if [[ "$SDK" == 11 ]]; then + isysroot="-isysroot $HOME/SDK/MacOS11.0.sdk" + base=$HOME/workspace + export MACOSX_DEPLOYMENT_TARGET=10.10 +else + base=/usr/local +fi + arch=$(uname -m) if [[ "$arch" == arm64 ]]; then env=$HOME/osx-environment/arm64/11.0 @@ -7,10 +15,9 @@ else fi sdk=$HOME/SDK -export CPPFLAGS= LDFLAGS="-L$base/lib -L$env/lib -isysroot $sdk/MacOSX11.0.sdk -arch $arch" -export LINKFLAGS="-L$base/lib -L$env/lib -isysroot $sdk/MacOSX11.0.sdk -arch $arch" -export MACOSX_DEPLOYMENT_TARGET=10.10 -export CXXFLAGS="-I$base/include -I$env/include -isysroot $sdk/MacOSX11.0.sdk -arch $arch" -export CFLAGS="-I$base/include -I$env/include -isysroot $sdk/MacOSX11.0.sdk -arch $arch" +export CPPFLAGS= LDFLAGS="-L$base/lib -L$env/lib $isysroot -arch $arch" +export LINKFLAGS="-L$base/lib -L$env/lib $isysroot -arch $arch" +export CXXFLAGS="-I$base/include -I$env/include $isysroot -arch $arch" +export CFLAGS="-I$base/include -I$env/include $isysroot -arch $arch" export PATH=$env/bin:$PATH export PKG_CONFIG_PATH=$env/lib/pkgconfig:$base/lib/pkgconfig |
