Use $(xcrun --sdk macosx --show-sdk-path) to parse SDK_PATH
Signed-off-by: Raul Metsma <raul@metsma.ee>
This commit is contained in:
parent
1226462f34
commit
890d97816e
@ -11,8 +11,7 @@ test -x ./configure || ./bootstrap
|
|||||||
BUILDPATH=${PWD}
|
BUILDPATH=${PWD}
|
||||||
|
|
||||||
# Locate the latest OSX SDK
|
# Locate the latest OSX SDK
|
||||||
SDKS_PATH="$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs"
|
SDK_PATH=$(xcrun --sdk macosx --show-sdk-path)
|
||||||
SDK_PATH="${SDK_PATH:-$SDKS_PATH/$(ls -1 ${SDKS_PATH} | sort -n -k2 -t. -r | head -1)}"
|
|
||||||
|
|
||||||
# Set SDK path
|
# Set SDK path
|
||||||
export CFLAGS="$CFLAGS -isysroot $SDK_PATH -arch x86_64 -mmacosx-version-min=10.10"
|
export CFLAGS="$CFLAGS -isysroot $SDK_PATH -arch x86_64 -mmacosx-version-min=10.10"
|
||||||
|
@ -592,13 +592,8 @@ if test "${enable_pcsc}" = "yes"; then
|
|||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-*-darwin*)
|
*-*-darwin*)
|
||||||
# Locate the latest SDK.
|
# Locate the latest SDK.
|
||||||
SDKS_PATH="$(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs"
|
SDK_PATH=$(xcrun --sdk macosx --show-sdk-path)
|
||||||
if test -d $SDKS_PATH; then
|
PCSC_CFLAGS="-I$SDK_PATH/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers"
|
||||||
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
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
PCSC_CFLAGS="-I/usr/include/PCSC"
|
PCSC_CFLAGS="-I/usr/include/PCSC"
|
||||||
|
Loading…
Reference in New Issue
Block a user