macos-setup: set SDKROOT when running xcrun.

That lets it find the right SDK path if you're not using the default
SDK.

(backported from commit 190442d76e)
This commit is contained in:
Guy Harris 2020-12-16 14:09:22 -08:00
parent 67f0d0ed73
commit 7901947b11
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ install_glib() {
# will be set to /usr/include (in those older versions of the
# developer tools, there is a /usr/include directory).
#
includedir=`xcrun --show-sdk-path 2>/dev/null`/usr/include
includedir=`SDKROOT="$SDKPATH" xcrun --show-sdk-path 2>/dev/null`/usr/include
if grep -qs '#define.*MACOSX' $includedir/ffi/fficonfig.h
then
# It's defined, nothing to do