summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs/features/functions.prf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmake/mkspecs/features/functions.prf')
-rw-r--r--tools/qmake/mkspecs/features/functions.prf44
1 files changed, 36 insertions, 8 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 80b64a653..acf15a811 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -1,9 +1,32 @@
defineTest(isPlatformSupported) {
static: return(false)
- !equals(QMAKE_HOST.arch, "x86_64"): return(false)
- osx:lessThan(QMAKE_XCODE_VERSION, 5.1): return(false)
+ osx:lessThan(QMAKE_XCODE_VERSION, 5.1) {
+ warning("Using xcode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.")
+ return(false)
+ }
+
+ linux-g++*:!isGCCVersionSupported():return(false)
+ !isPythonVersionSupported(): return(false)
+ linux-g++*|win32-msvc2013|macx-clang: return(true)
+ boot2qt: return(true)
+
+ warning("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation".)
+ return(false)
+}
- linux|win32-msvc2013|macx-clang: return(true)
+defineTest(isPythonVersionSupported) {
+ python_major_version = $$system('python -c "import sys; print sys.version_info.major"')
+ python_minor_version = $$system('python -c "import sys; print sys.version_info.minor"')
+ greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): return(true)
+ warning("Using Python version "$$python_major_version"."$$python_minor_version", but at least Python version 2.7 is required to build Qt WebEngine.")
+ return(false)
+}
+
+defineTest(isGCCVersionSupported) {
+ # The below will work for gcc 4.6 and up and also match gcc 5
+ greaterThan(QT_GCC_MINOR_VERSION, 5):return(true)
+ greaterThan(QT_GCC_MAJOR_VERSION, 4):return(true)
+ warning("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.6 is required to build Qt WebEngine.")
return(false)
}
@@ -35,7 +58,7 @@ defineReplace(getChromiumSrcDir) {
}
defineReplace(extractCFlag) {
- CFLAGS = $$QMAKE_CFLAGS
+ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS
!isEmpty(ANDROID_TARGET_CFLAGS): CFLAGS = $$ANDROID_TARGET_CFLAGS
OPTION = $$find(CFLAGS, $$1)
OPTION = $$split(OPTION, =)
@@ -105,10 +128,15 @@ defineReplace(which) {
}
defineReplace(findOrBuildNinja) {
- out = $$absolute_path("$${getChromiumSrcDir()}/../ninja/ninja", "$$QTWEBENGINE_ROOT")
- win32: out = $$system_path($${out}.exe)
+ # If NINJA_PATH env var is set, prefer that.
+ # Fallback to locating our own bootstrapped ninja.
+ out = $(NINJA_PATH)
+ !exists($$out) {
+ out = $$absolute_path("$${getChromiumSrcDir()}/../ninja/ninja", "$$QTWEBENGINE_ROOT")
+ win32: out = $$system_path($${out}.exe)
- # If we did not find ninja, then we bootstrap it.
- !exists($$out): system("python $$dirname(out)/bootstrap.py")
+ # If we did not find ninja, then we bootstrap it.
+ !exists($$out): system("python $$dirname(out)/bootstrap.py")
+ }
return($$out)
}