summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-04-17 12:15:39 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-27 09:39:50 +0200
commit4753958db707001d1e14fa8312708dc1e891bacc (patch)
treea08250cc5e1c79fd2c8622dd42dbaff8b114bb4e /mkspecs
parent777fa561ab3af83ac78dbe55a22ae28097f0dfbd (diff)
revamp handling of qmake target mode
the project evaluator becomes oblivious of the target mode. the mode is set up in spec_post.prf according to the spec. $$QMAKE_TARGET contains the feature suffixes to search, and is also contained in $$CONFIG. the target_mode variable itself becomes private to the Makefile class. Change-Id: I3c06d9dab536b753343cec6c5c491d3203e50bd8 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/spec_post.prf31
1 files changed, 31 insertions, 0 deletions
diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf
new file mode 100644
index 0000000000..fcc7314ce5
--- /dev/null
+++ b/mkspecs/features/spec_post.prf
@@ -0,0 +1,31 @@
+isEmpty(MAKEFILE_GENERATOR):error("Qmake spec does not set MAKEFILE_GENERATOR.")
+isEmpty(QMAKE_PLATFORM) {
+ isEmpty(TARGET_PLATFORM) {
+ equals(MAKEFILE_GENERATOR, UNIX) {
+ equals(QMAKE_HOST.os, Darwin): \
+ TARGET_PLATFORM = macx
+ else: \
+ TARGET_PLATFORM = unix
+ } else:if(equals(MAKEFILE_GENERATOR, MSVC.NET) \
+ |equals(MAKEFILE_GENERATOR, BMAKE) \
+ |equals(MAKEFILE_GENERATOR, MSBUILD) \
+ |equals(MAKEFILE_GENERATOR, MINGW)) {
+ TARGET_PLATFORM = win32
+ } else:if(equals(MAKEFILE_GENERATOR, PROJECTBUILDER) \
+ |equals(MAKEFILE_GENERATOR, XCODE)) {
+ } else:equals(MAKEFILE_GENERATOR, GBUILD) {
+ TARGET_PLATFORM = unix
+ } else {
+ error("Qmake spec sets an invalid MAKEFILE_GENERATOR.")
+ }
+ }
+ equals(TARGET_PLATFORM, unix): \
+ QMAKE_PLATFORM = unix
+ else:equals(TARGET_PLATFORM, macx): \
+ QMAKE_PLATFORM = mac macx unix
+ else:equals(TARGET_PLATFORM, win32): \
+ QMAKE_PLATFORM = win32
+ else: \
+ error("Qmake spec sets an invalid TARGET_PLATFORM.")
+}
+CONFIG += $$QMAKE_PLATFORM