$xcodePath -> $SDKROOT

SDKROOT is standard. In particular, this fixes the cmake build on
Mac OS X 10.9.
This commit is contained in:
Eelco Dolstra
2014-07-24 21:53:46 +02:00
parent bf0d518c67
commit ac8775dd96
4 changed files with 10 additions and 10 deletions
@@ -309,12 +309,12 @@ stdenv.mkDerivation ({
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
if xcodePath=$(/usr/bin/xcrun --show-sdk-path); then
configureFlagsArray+=(--with-native-system-header-dir=$xcodePath/usr/include)
if SDKROOT=$(/usr/bin/xcrun --show-sdk-path); then
configureFlagsArray+=(--with-native-system-header-dir=$SDKROOT/usr/include)
makeFlagsArray+=( \
CFLAGS_FOR_BUILD=-F$xcodePath/System/Library/Frameworks \
CFLAGS_FOR_TARGET=-F$xcodePath/System/Library/Frameworks \
FLAGS_FOR_TARGET=-F$xcodePath/System/Library/Frameworks \
CFLAGS_FOR_BUILD=-F$SDKROOT/System/Library/Frameworks \
CFLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \
FLAGS_FOR_TARGET=-F$SDKROOT/System/Library/Frameworks \
)
fi
'';