summaryrefslogtreecommitdiffstats
path: root/qtbase.pro
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-01-31 18:36:18 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-19 16:37:49 +0200
commit14bbab09c158e3eb54169b42c4a303d396a32f0e (patch)
treefd4706e980c1440eb6b91868d71979060af2398c /qtbase.pro
parent528192a78b3250964ee99efab42b6683da02eb11 (diff)
introduce ability to build projects for the host system
when qmake runs into the new option(host_build) command, it will restart the project evaluation with a host spec. the new default host spec is called default-host (gasp!). it is overridden with the pre-exising -spec / -platform option, while the new -xspec / -xplatform option overrides the pre-existing default spec. specifying -spec but not -xspec will set the xspec, too, so the behavior is backwards-compatible. same for the XQMAKESPEC override read from .qmake.cache and the environment variable. the cleaner solution would be adding -hostspec, to be symmetrical with the override semantics, but that would deviate from configure in turn. Change-Id: I4297c873780af16ab7928421b434ce0f1d3820da Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qtbase.pro')
-rw-r--r--qtbase.pro18
1 files changed, 10 insertions, 8 deletions
diff --git a/qtbase.pro b/qtbase.pro
index 5efe77e99d..e8a26b7e9f 100644
--- a/qtbase.pro
+++ b/qtbase.pro
@@ -118,15 +118,17 @@ INSTALLS += configtests
mkspecs.path = $$[QT_HOST_DATA]/mkspecs
mkspecs.files = $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri $$OUT_PWD/mkspecs/qdevice.pri $$files($$PWD/mkspecs/*)
mkspecs.files -= $$PWD/mkspecs/modules
-unix {
- DEFAULT_QMAKESPEC = $$QMAKESPEC
- DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
- mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
- mkspecs.files -= $$PWD/mkspecs/default
-}
-win32:!equals(OUT_PWD, $$PWD) {
+unix {
+ DEFAULT_QMAKESPEC = $$replace(QMAKESPEC, ^.*mkspecs/, )
+ DEFAULT_XQMAKESPEC = $$replace(XQMAKESPEC, ^.*mkspecs/, )
+ mkspecs.commands = \
+ $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default-host $(INSTALL_ROOT)$$mkspecs.path/default; \
+ $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default-host && \
+ $(SYMLINK) $$DEFAULT_XQMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
+ mkspecs.files -= $$PWD/mkspecs/default-host $$PWD/mkspecs/default
+} else:!equals(OUT_PWD, $$PWD) {
# When shadow building on Windows, the default mkspec only exists in the build tree.
- mkspecs.files += $$OUT_PWD/mkspecs/default
+ mkspecs.files += $$OUT_PWD/mkspecs/default-host $$OUT_PWD/mkspecs/default
}
INSTALLS += mkspecs