summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-09 15:22:24 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-05-09 15:22:24 +0200
commit0eac492b5c66b1774118c387dd527ad419e51be7 (patch)
tree37324fdefd615e433dd65073390d7b9996d660d3 /mkspecs/features
parent5d6086d1b97461b35c143839a8a6ba1b990bb87c (diff)
parent99d46a8a918dee7323bc3d4f1624c47c097f9a3a (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/configure.prf4
-rw-r--r--mkspecs/features/gn_generator.prf45
-rw-r--r--mkspecs/features/platform.prf2
3 files changed, 36 insertions, 15 deletions
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index d7d382a4f..42e5b40c9 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -4,6 +4,10 @@ load(functions)
load(platform)
defineTest(runConfigure) {
+ !qtHaveModule(gui) {
+ skipBuild("QtWebEngine requires QtGui.")
+ return(false)
+ }
!exists(src/3rdparty/chromium) {
skipBuild("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf
index e6ae263ac..78b56d123 100644
--- a/mkspecs/features/gn_generator.prf
+++ b/mkspecs/features/gn_generator.prf
@@ -26,6 +26,8 @@ isEmpty(GN_FILE): GN_FILE = $$system_path($$_PRO_FILE_PWD_/BUILD.gn)
isEmpty(GN_RUN_BINARY_SCRIPT): GN_RUN_BINARY_SCRIPT = "//build/gn_run_binary.py"
isEmpty(GN_FIND_MOCABLES_SCRIPT): GN_FIND_MOCABLES_SCRIPT = "//build/gn_find_mocables.py"
+GN_CONTENTS += "import(\"//build/config/jumbo.gni\")"
+
# MOC SETUP
GN_CONTENTS += "moc_source_h_files = exec_script(\"$$GN_FIND_MOCABLES_SCRIPT\","
@@ -118,13 +120,18 @@ GN_CONTENTS += "config(\"$${TARGET}_config\") {"
}
# Stop the barrage of unused variables warnings.
-gcc|clang {
+gcc|clang|clang_cl {
QMAKE_CXXFLAGS += "-Wno-unused-parameter"
QMAKE_CXXFLAGS += "-Wno-unused-variable"
} else:msvc {
QMAKE_CXXFLAGS += /wd4100 /wd4101
}
+# Chromium activates this, but we need it off to be able to compile QFlags
+clang_cl {
+ QMAKE_CXXFLAGS += "-fno-complete-member-pointers"
+}
+
!isEmpty(QMAKE_CXXFLAGS) {
GN_CONTENTS += " cflags_cc = ["
for(flag, QMAKE_CXXFLAGS): GN_CONTENTS += " \"$$filter_flag_values($$flag)\","
@@ -169,6 +176,26 @@ GN_CONTENTS += "}"
# TARGET SETUP
+GN_CONTENTS += "jumbo_source_set(\"$${TARGET}_MOC\") {"
+GN_CONTENTS += " configs += [ \":$${TARGET}_config\" ]"
+GN_CONTENTS += " configs += [ \"//build/config:precompiled_headers\" ]"
+GN_CONTENTS += " sources = []"
+GN_CONTENTS += " deps = []"
+GN_CONTENTS += " if (moc_source_h_files != []) {"
+GN_CONTENTS += " deps += ["
+GN_CONTENTS += " \":generate_h_mocs\","
+GN_CONTENTS += " ]"
+# Add moc output files to compile
+GN_CONTENTS += " sources += get_target_outputs(\":generate_h_mocs\")"
+GN_CONTENTS += " }"
+GN_CONTENTS += " if (moc_source_cpp_files != []) {"
+GN_CONTENTS += " deps += ["
+GN_CONTENTS += " \":generate_cpp_mocs\","
+GN_CONTENTS += " ]"
+GN_CONTENTS += " }"
+GN_CONTENTS += "}"
+
+
TARGET_TYPE = $$getTargetType()
GN_CONTENTS += "$${TARGET_TYPE}(\"$$TARGET\") {"
@@ -177,7 +204,8 @@ GN_CONTENTS += "$${TARGET_TYPE}(\"$$TARGET\") {"
for (imp, GN_IMPORTS): GN_CONTENTS += " import(\"$$imp\")"
}
-GN_CONTENTS += " configs += [ \":$${TARGET}_config\" ] "
+GN_CONTENTS += " configs += [ \":$${TARGET}_config\" ]"
+GN_CONTENTS += " configs += [ \"//build/config:precompiled_headers\" ]"
# Source files to compile
GN_CONTENTS += " sources = ["
@@ -220,18 +248,7 @@ win32 {
CONFIG(rtti): GN_CONTENTS += " configs += [\"//build/config/compiler:rtti\"]"
}
-GN_CONTENTS += " if (moc_source_h_files != []) {"
-GN_CONTENTS += " deps += ["
-GN_CONTENTS += " \":generate_h_mocs\","
-GN_CONTENTS += " ]"
-# Add moc output files to compile
-GN_CONTENTS += " sources += get_target_outputs(\":generate_h_mocs\")"
-GN_CONTENTS += " }"
-GN_CONTENTS += " if (moc_source_cpp_files != []) {"
-GN_CONTENTS += " deps += ["
-GN_CONTENTS += " \":generate_cpp_mocs\","
-GN_CONTENTS += " ]"
-GN_CONTENTS += " }"
+GN_CONTENTS += " deps += [ \":$${TARGET}_MOC\" ]"
GN_CONTENTS += "}"
GN_CONTENTS += ""
GN_CONTENTS += "if (!defined(core_include_dirs)) {"\
diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf
index 9adc02f75..53ea51014 100644
--- a/mkspecs/features/platform.prf
+++ b/mkspecs/features/platform.prf
@@ -26,7 +26,7 @@ defineTest(isPlatformSupported) {
skipBuild("Qt WebEngine on Windows must be built on a 64-bit machine.")
}
!msvc|intel_icl {
- skipBuild("Qt WebEngine on Windows requires MSVC.")
+ skipBuild("Qt WebEngine on Windows requires MSVC or Clang (MSVC mode).")
return(false)
}
!isMinWinSDKVersion(10, 16299): {