Use $(xcrun --sdk macosx --show-sdk-path) to parse SDK_PATH

Signed-off-by: Raul Metsma <raul@metsma.ee>
This commit is contained in:
Raul Metsma 2017-03-01 00:30:43 +02:00 committed by Frank Morgner
parent 1226462f34
commit 890d97816e
2 changed files with 3 additions and 9 deletions

View File

@ -11,8 +11,7 @@ test -x ./configure || ./bootstrap
BUILDPATH=${PWD}
# Locate the latest OSX SDK
SDKS_PATH="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs"
SDK_PATH="${SDK_PATH:-$SDKS_PATH/$(ls -1 ${SDKS_PATH} | sort -n -k2 -t. -r | head -1)}"
SDK_PATH=$(xcrun --sdk macosx --show-sdk-path)
# Set SDK path
export CFLAGS="$CFLAGS -isysroot $SDK_PATH -arch x86_64 -mmacosx-version-min=10.10"

View File

@ -592,13 +592,8 @@ if test "${enable_pcsc}" = "yes"; then
case "${host}" in
*-*-darwin*)
# Locate the latest SDK.
SDKS_PATH="$(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs"
if test -d $SDKS_PATH; then
SDK_PATH="${SDK_PATH:-$SDKS_PATH/$(ls -1 ${SDKS_PATH} | sort -n -t. -k2 -r | head -1)}"
PCSC_CFLAGS="-I$SDK_PATH/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers"
else
PCSC_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Headers"
fi
SDK_PATH=$(xcrun --sdk macosx --show-sdk-path)
PCSC_CFLAGS="-I$SDK_PATH/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers"
;;
*)
PCSC_CFLAGS="-I/usr/include/PCSC"