summaryrefslogtreecommitdiff
path: root/Tools/qmake/mkspecs/features/default_pre.prf
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-03-12 14:11:15 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-03-12 14:11:15 +0100
commitdd91e772430dc294e3bf478c119ef8d43c0a3358 (patch)
tree6f33ce4d5872a5691e0291eb45bf6ab373a5f567 /Tools/qmake/mkspecs/features/default_pre.prf
parentad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (diff)
downloadqtwebkit-dd91e772430dc294e3bf478c119ef8d43c0a3358.tar.gz
Imported WebKit commit 3db4eb1820ac8fb03065d7ea73a4d9db1e8fea1a (http://svn.webkit.org/repository/webkit/trunk@110422)
This includes build fixes for the latest qtbase/qtdeclarative as well as the final QML2 API.
Diffstat (limited to 'Tools/qmake/mkspecs/features/default_pre.prf')
-rw-r--r--Tools/qmake/mkspecs/features/default_pre.prf53
1 files changed, 35 insertions, 18 deletions
diff --git a/Tools/qmake/mkspecs/features/default_pre.prf b/Tools/qmake/mkspecs/features/default_pre.prf
index 776728dda..0a9ef78a3 100644
--- a/Tools/qmake/mkspecs/features/default_pre.prf
+++ b/Tools/qmake/mkspecs/features/default_pre.prf
@@ -7,6 +7,10 @@
load(functions)
+# Derived sources often need QMAKE_MOC
+load(qt_functions)
+load(moc)
+
# FIXME: In this case we probably want to exit early so that we
# don't load all of the custom build tweaks needlessly.
pro_file = $$_PRO_FILE_ # Checking the variable directly does not work
@@ -28,7 +32,23 @@ ROOT_BUILD_DIR = $$replace(OUT_PWD, $$WEBKIT_SUBDIR,)
pro_file_name = $$basename(_PRO_FILE_)
!equals(pro_file_name, configure.pro): QMAKE_SYNCQT_OUTDIR = $$ROOT_BUILD_DIR
-load(default_pre) # Load Qt's defaults after we've resolved the build directory
+# Load Qt's defaults after we've resolved the build directory. This will also
+# run syncqt if there is a sync.profile in the $$_PRO_FILE_PWD_. We never want
+# to enable Qt's concept of a developer-build, since we take care of installing
+# our own module file. See api.pri for details about how we utilize this.
+old_qtdir=$$QTDIR
+QTDIR=no-developer-build-please
+load(default_pre)
+QTDIR=$$old_qtdir
+
+# Load results of config tests (only supported in Qt 5)
+haveQt(5): include($${ROOT_BUILD_DIR}/Tools/qmake/.qmake.cache, , true)
+
+unix:config_test_gccdepends {
+ # We have a compiler that supports the -MD option (and neither
+ # teambuilder nor icecream is messing up the .d file output).
+ CONFIG += GNUmake gcc_MD_depends
+}
equals(OUT_PWD, $${ROOT_BUILD_DIR}) {
!recursive_include:CONFIG += root_project_file
@@ -42,30 +62,24 @@ equals(OUT_PWD, $${ROOT_BUILD_DIR}) {
BUILD_ROOT_RELATIVE_TO_OUT_PWD = $$join(BUILD_ROOT_RELATIVE_TO_OUT_PWD, $${QMAKE_DIR_SEP})
}
-# Make sure QMAKEPATH is set for recursive targets
+# Try to detect if we're running under Windows cmd.exe or not
win32* {
pwd = $$(PWD) # Normally empty for cmd.exe
- is_building_under_cygwin = $$find(pwd, ^/)
- !isEmpty(is_building_under_cygwin) {
- QMAKE_QMAKE = QMAKEPATH=$$(QMAKEPATH) $$QMAKE_QMAKE
- } else {
- QMAKE_QMAKE = \(set QMAKEPATH=$$(QMAKEPATH)\) && $$QMAKE_QMAKE
- }
-} else {
- QMAKE_QMAKE = QMAKEPATH=$$(QMAKEPATH) $$QMAKE_QMAKE
+ pwd_starts_with_slash = $$find(pwd, ^/)
+ isEmpty(pwd_starts_with_slash): CONFIG += win_cmd_shell
}
+# Make sure QMAKEPATH is set for recursive targets
+win_cmd_shell: QMAKE_QMAKE = \(set QMAKEPATH=$$(QMAKEPATH)\) && $$QMAKE_QMAKE
+else: QMAKE_QMAKE = QMAKEPATH=$$(QMAKEPATH) $$QMAKE_QMAKE
+
# Default location of generated sources
GENERATED_SOURCES_DESTDIR = generated
QUOTE = ""
DOUBLE_ESCAPED_QUOTE = ""
ESCAPE = ""
-win32-msvc* {
- ESCAPE = "^"
-} else:win32-g++*:isEmpty(QMAKE_SH) {
- # MinGW's make will run makefile commands using sh, even if make
- # was run from the Windows shell, if it finds sh in the path.
+win_cmd_shell {
ESCAPE = "^"
} else {
QUOTE = "\'"
@@ -95,9 +109,12 @@ haveQt(5): {
}
}
-QT.webkit.modulefile = $${ROOT_WEBKIT_DIR}/Tools/qmake/mkspecs/modules/qt_webkit.pri
-include($$QT.webkit.modulefile)
-VERSION = $${QT.webkit.VERSION}
+haveQt(4) {
+ # Qt5 will automatically load the module files for us, but for Qt4
+ # we have to do it manually so that the various QT.webkit.foo names
+ # are available.
+ include($${ROOT_WEBKIT_DIR}/Tools/qmake/qt_webkit.pri)
+}
# Set some defaults for specific platforms
CONFIG += include_webinspector