summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2012-10-31 10:50:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-23 10:08:10 +0100
commit490379a3e3c94c9e69f34b0c2b688608bb319f42 (patch)
treec8a17f6686f73ee3592e8730a51e13b64e6a2b83
parent6a9b7130710577245a0731f7b47ad4c4b16c882d (diff)
Mac: Fix compilation with -sdk option
The include paths that the mkspecs set into the OpenGL/AGL frameworks must take the SDK into account. (The headers in 10.8 have slightly changed wrt 10.7, leading to compile errors because framework style includes (<OpenGL/foo.h>) within the system headers are resolved to the SDK framework headers.) Change-Id: I6113cdb95b462d587f593682e03e81e920f3f672 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-rwxr-xr-xconfigure6
-rw-r--r--mkspecs/common/mac.conf7
2 files changed, 6 insertions, 7 deletions
diff --git a/configure b/configure
index fa8a535a6a..a4493693e7 100755
--- a/configure
+++ b/configure
@@ -1283,6 +1283,7 @@ while [ "$#" -gt 0 ]; do
sdk)
if [ "$BUILD_ON_MAC" = "yes" ]; then
CFG_SDK="$VAL"
+ DeviceVar set QMAKE_MAC_SDK "$VAL"
else
UNKNOWN_OPT=yes
fi
@@ -6092,11 +6093,6 @@ elif [ "$CFG_OPENSSL" = "linked" ]; then
echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
fi
-#dump in the SDK info
-if [ '!' -z "$CFG_SDK" ]; then
- echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
-fi
-
# cmdline args
cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
rm -f "$QMAKE_VARS_FILE" 2>/dev/null
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index 9830110347..e318cb775e 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -1,6 +1,9 @@
#
# qmake configuration for common Mac OS X
#
+!load(device_config) {
+ error(Could not successfully load device configuration)
+}
QMAKE_PLATFORM += macx mac
@@ -9,8 +12,8 @@ QMAKE_RESOURCE = /Developer/Tools/Rez
QMAKE_EXTENSION_SHLIB = dylib
QMAKE_LIBDIR =
-QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers \
- /System/Library/Frameworks/AGL.framework/Headers/
+QMAKE_INCDIR_OPENGL = $$QMAKE_MAC_SDK/System/Library/Frameworks/OpenGL.framework/Headers \
+ $$QMAKE_MAC_SDK/System/Library/Frameworks/AGL.framework/Headers/
QMAKE_FIX_RPATH = install_name_tool -id