put the include/ of all modules into qtbase when doing non-prefix build
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Tue, 10 Jul 2012 19:35:39 +0000 (21:35 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 18 Jul 2012 17:48:59 +0000 (19:48 +0200)
all other build artifacts go into qtbase's build directory anyway. this
asymmetry was confusing and causes cmake users some grief.

Change-Id: I4d7f7b2318f6c5300eb00360664785cb2c8217b7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
mkspecs/features/default_pre.prf
mkspecs/features/qt_module_fwdpri.prf
mkspecs/features/qt_module_headers.prf

index 2a72966..ca63e38 100644 (file)
@@ -12,6 +12,9 @@ CONFIG = lex yacc warn_on debug exceptions $$CONFIG
                 cache(QMAKEMODULES, add super, modpath)
             unset(modpath)
         }
+    } else {
+        # When doing a build without -prefix, put the headers directly into qtbase.
+        isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$[QT_HOST_DATA]
     }
 
     qtPrepareTool(QMAKE_SYNCQT, syncqt)
index 9a5abd7..2fd833d 100644 (file)
@@ -17,7 +17,7 @@
     MODULE_FWD_PRI_CONT = \
         "QT_MODULE_BASE = $$MODULE_BASE_DIR" \
         "QT_MODULE_BIN_BASE = $$mod_component_base/bin" \
-        "QT_MODULE_INCLUDE_BASE = $$MODULE_BASE_OUTDIR/include" \
+        "QT_MODULE_INCLUDE_BASE = $$mod_component_base/include" \
         "QT_MODULE_IMPORT_BASE = $$mod_component_base/imports" \
         "QT_MODULE_LIB_BASE = $$mod_component_base/lib" \
         "QT_MODULE_PLUGIN_BASE = $$mod_component_base/plugins" \
index 6a1854a..cd41c17 100644 (file)
@@ -1,5 +1,11 @@
+QTDIR = $$[QT_HOST_PREFIX]
+!force_independent:exists($$QTDIR/.qmake.cache): \
+    mod_component_base = $$QTDIR
+else: \
+    mod_component_base = $$MODULE_BASE_OUTDIR
+
 #load up the headers info
-include($$MODULE_BASE_OUTDIR/include/$$TARGET/headers.pri, "", true)
+include($$mod_component_base/include/$$TARGET/headers.pri, "", true)
 
 lctarget = $$lower($$TARGET)
 uctarget = $$upper($$TARGET)
@@ -40,7 +46,7 @@ count(MODULE_VERSION_HEADER, 1) {
 }
 
 # Create a module master header
-MODULE_MASTER_HEADER = $$MODULE_BASE_OUTDIR/include/$$TARGET/$$TARGET
+MODULE_MASTER_HEADER = $$mod_component_base/include/$$TARGET/$$TARGET
 !build_pass {
     MODULE_MASTER_HEADER_CONT = \
         "/* This file was generated by qmake with the info from $${_PRO_FILE_}. */" \