From 26f2fa153e60a9eb0a75f3c5eb53de46fb85baba Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Mon, 17 Jun 2024 23:55:36 +0100 Subject: [PATCH] fix(macOS): Add check for `macos_environment.sh` in build script `macos_environment.sh` reference in `clean_build.sh` caused a build error. This fix allows for `macos_environment.sh` to be sourced, if it exists. If not, it doesn't error out. Related: #1846. Signed-off-by: Dom Rodriguez --- clean_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clean_build.sh b/clean_build.sh index d73d39672..032316082 100755 --- a/clean_build.sh +++ b/clean_build.sh @@ -17,7 +17,7 @@ B_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=${B_BUILD_TYPE} ${B_CMAKE_FLAGS:-}" if [ "$(uname)" = "Darwin" ]; then # macOS needs a little help, so we source this environment script to fix paths. - . ./macos_environment.sh + [ -e ./macos_environment.sh ] && . ./macos_environment.sh B_CMAKE_FLAGS="${B_CMAKE_FLAGS} -DCMAKE_OSX_SYSROOT=$(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9" fi