diff --git a/configure.json b/configure.json index 4b9288bbbaf6532dff0652e18403a86a2d2a49cf..8caad24f00a92fcc87c3616c0f728a3afc6679ff 100644 --- a/configure.json +++ b/configure.json @@ -1,353 +1,8 @@ { - "files": { - "privatePro": "src/qtwebengine-main-config.pri" - }, - "subconfigs": [ + "src/buildtools", "src/core", "src/webengine", "src/webenginewidgets" - ], - "commandline": { - "options": { - "webengine-core": "boolean", - "webengine-jumbo-build": { "type": "optionalString", "name": "merge_limit"} - } - }, - "libraries": { - "webengine-dbus": { - "label": "d-bus", - "sources": [ - { "type": "pkgConfig", "args": "dbus-1" } - ] - }, - "webengine-fontconfig": { - "label": "fontconfig", - "sources": [ - { "type": "pkgConfig", "args": "fontconfig" } - ] - }, - "webengine-libdrm": { - "label": "libdrm", - "sources": [ - { "type": "pkgConfig", "args": "libdrm" } - ] - }, - "webengine-xcomposite": { - "label": "xcomposite", - "sources": [ - { "type": "pkgConfig", "args": "xcomposite" } - ] - }, - "webengine-xcursor": { - "label": "xcursor", - "sources": [ - { "type": "pkgConfig", "args": "xcursor" } - ] - }, - "webengine-xi": { - "label": "xi", - "sources": [ - { "type": "pkgConfig", "args": "xi" } - ] - }, - "webengine-xtst": { - "label": "xtst", - "sources": [ - { "type": "pkgConfig", "args": "xtst" } - ] - }, - "webengine-nss": { - "label": "nss >= 3.26", - "sources": [ - { "type": "pkgConfig", "args": "nss >= 3.26" } - ] - }, - "webengine-x11" : { - "label" : "x11", - "sources": [ - { "type": "pkgConfig", "args": "x11" } - ] - } - }, - - "testDir": "config.tests", - "tests" : { - "webengine-bison": { - "label": "bison", - "type": "detectBison" - }, - "webengine-flex": { - "label": "flex", - "type": "detectFlex" - }, - "webengine-gn": { - "label": "system gn", - "type": "detectGn" - }, - "webengine-glibc": { - "label": "glibc > 2.26", - "type": "compile", - "test": { - "include": "features.h", - "tail": [ - "#if __GLIBC__ < 2 || __GLIBC_MINOR__ < 27", - "#error glibc versions below 2.27 are not supported", - "#endif" - ] - } - }, - "webengine-gperf": { - "label": "gperf", - "type": "detectGperf" - }, - "webengine-khr": { - "label": "khr", - "type": "compile", - "test": { - "include": "KHR/khrplatform.h", - "qmake" : [ - "!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL", - "!isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL" - ] - } - }, - "webengine-ninja": { - "label": "system ninja", - "type": "detectNinja" - }, - "webengine-python2": { - "label": "python2", - "type": "detectPython2", - "log": "location" - }, - "webengine-winversion": { - "label": "winversion", - "type": "compile", - "test": { - "head" : [ - "#if !defined(__clang__) && _MSC_FULL_VER < 191426428", - "#error unsupported Visual Studio version", - "#endif" - ] - } - }, - "webengine-host-pkg-config": { - "label": "host pkg-config", - "type": "detectHostPkgConfig", - "log": "path" - }, - "webengine-xcb": { - "label": "qtbase xcb", - "type": "detectXcb" - }, - "webengine-jumbo-build": { - "label": "jumbo build merge limit", - "type": "detectJumboBuild", - "log": "merge_limit" - } - }, - "features": { - "webengine-core": { - "label": "Support Qt WebEngine Core", - "purpose": "Provides WebEngine Core support.", - "condition": "module.gui - && features.webengine-python2 - && features.webengine-gperf - && features.webengine-bison - && features.webengine-flex - && (!tests.webengine-xcb || features.webengine-ozone-x11)", - "output": [ "privateFeature" ] - }, - "webengine-python2": { - "label": "python2", - "condition": "tests.webengine-python2", - "output": [ - "privateFeature", - { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } - ] - }, - "webengine-gperf": { - "label": "gperf", - "condition": "tests.webengine-gperf", - "output": [ "privateFeature" ] - }, - "webengine-bison": { - "label": "bison", - "condition": "tests.webengine-bison", - "output": [ "privateFeature" ] - }, - "webengine-flex": { - "label": "flex", - "condition": "tests.webengine-flex", - "output": [ "privateFeature" ] - }, - "webengine-system-ninja": { - "label": "Use System Ninja", - "condition": "tests.webengine-ninja", - "output": [ "privateFeature" ] - }, - "webengine-system-fontconfig": { - "label": "fontconfig", - "condition": "libs.webengine-fontconfig", - "output": [ "privateFeature" ] - }, - "webengine-system-dbus": { - "label": "dbus", - "condition": "libs.webengine-dbus", - "output": [ "privateFeature" ] - }, - "webengine-system-libdrm": { - "label": "libdrm", - "condition": "libs.webengine-libdrm", - "output": [ "privateFeature" ] - }, - "webengine-system-xcomposite": { - "label": "xcomposite", - "condition": "libs.webengine-xcomposite", - "output": [ "privateFeature" ] - }, - "webengine-system-xcursor": { - "label": "xcursor", - "condition": "libs.webengine-xcursor", - "output": [ "privateFeature" ] - }, - "webengine-system-xi": { - "label": "xi", - "condition": "libs.webengine-xi", - "output": [ "privateFeature" ] - }, - "webengine-system-xtst": { - "label": "xtst", - "condition": "libs.webengine-xtst", - "output": [ "privateFeature" ] - }, - "webengine-system-gn": { - "label": "Use System Gn", - "autoDetect": "false", - "condition": "tests.webengine-gn", - "output": [ "privateFeature" ] - }, - "webengine-system-khr" : { - "label": "khr", - "condition": "config.unix && tests.webengine-khr", - "output": [ "privateFeature" ] - }, - "webengine-system-nss": { - "label": "nss", - "condition": "config.unix && !config.darwin && libs.webengine-nss", - "output": [ "privateFeature" ] - }, - "webengine-system-glibc": { - "label": "glibc", - "condition": "config.linux && tests.webengine-glibc", - "output": [ "privateFeature" ] - }, - "webengine-system-x11" : { - "label": "x11", - "condition": "config.unix && libs.webengine-x11", - "output": [ "privateFeature" ] - }, - "webengine-host-pkg-config": { - "label": "host-pkg-config", - "condition": "config.unix && tests.webengine-host-pkg-config", - "output": [ - "privateFeature", - { "type": "varAssign", "name": "QMAKE_PKG_CONFIG_HOST", "value": "tests.webengine-host-pkg-config.path" } - ] - }, - "webengine-ozone-x11" : { - "label": "Support qpa-xcb", - "condition": "config.unix - && tests.webengine-xcb - && features.webengine-system-x11 - && features.webengine-system-libdrm - && features.webengine-system-xcomposite - && features.webengine-system-xcursor - && features.webengine-system-xi - && features.webengine-system-xtst", - "output": [ "privateFeature" ] - }, - "webengine-winversion" : { - "label": "winversion", - "condition": "config.win32 && tests.webengine-winversion", - "output": [ "privateFeature" ] - }, - "webengine-jumbo-build": { - "label": "jumbo build merge batch", - "condition": "tests.webengine-jumbo-build", - "output": [ - "privateFeature", - { "type": "varAssign", "name": "QMAKE_JUMBO_MERGE_LIMIT", "value": "tests.webengine-jumbo-build.merge_limit" } - ] - } - }, - "report": [ - { - "type": "warning", - "condition": "!module.gui", - "message": "QtWebEngine requires QtGui." - }, - { - "type": "warning", - "condition": "!features.webengine-python2", - "message": "Python version 2 (2.7.5 or later) is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-gperf", - "message": "gperf is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-bison", - "message": "bison is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-flex", - "message": "flex is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "config.linux && !features.webengine-ozone-x11 && tests.webengine-xcb", - "message": "Could not find all necessary libraries for qpa-xcb support." - } - ], - "summary": [ - { - "section": "Build Tools", - "entries": [ - "webengine-system-ninja", - "webengine-system-gn", - { - "message": "Jumbo Build Merge Limit", - "type": "jumboBuild" - } - ] - }, - { - "section": "Required system libraries", - "condition": "config.unix && !config.macos && features.webengine-core", - "entries": [ - "webengine-system-fontconfig", - "webengine-system-dbus", - "webengine-system-nss", - "webengine-system-khr", - "webengine-system-glibc" - ] - }, - { - "section": "Required system libraries for qpa-xcb", - "condition": "config.unix && !config.macos && features.webengine-core", - "entries": [ - "webengine-system-x11", - "webengine-system-libdrm", - "webengine-system-xcomposite", - "webengine-system-xcursor", - "webengine-system-xi", - "webengine-system-xtst" - ] - } ] } diff --git a/configure.pri b/configure.pri index f946240533cc6cf860a48e42b7dca03ac44e371b..196c9abb11dba6bac2ea025ce15e205ac26f6984 100644 --- a/configure.pri +++ b/configure.pri @@ -149,20 +149,6 @@ defineTest(qtConfTest_detectEmbedded) { return(false) } -defineTest(qtConfTest_detectXcb) { - #workaround for for not working 'depends' in main configure when no 'module' - QT_FOR_CONFIG += gui-private - qtConfig(xcb): return(true) - return(false) -} - -defineTest(qtConfTest_detectDeveloperBuild) { - #workaround for for not working 'depends' in main configure when no 'module' - QT_FOR_CONFIG += core-private - qtConfig(private_tests): return(true) # enabled for developer-build - return(false) -} - defineTest(qtConfTest_detectHostPkgConfig) { PKG_CONFIG = $$qtConfPkgConfig(true) isEmpty(PKG_CONFIG) { diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf index f858243e1f8efb674f00aaa571838e8d00327c09..e6c74fc87d6cd4bd01bd00355fdc6b274a8277a4 100644 --- a/mkspecs/features/functions.prf +++ b/mkspecs/features/functions.prf @@ -130,8 +130,8 @@ defineTest(isWebEngineCoreBuild) { return(false) } - include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) - QT_FOR_CONFIG += webenginecore-private + include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) + QT_FOR_CONFIG += buildtools-private win32:!qtConfig(webengine-win-compiler64) { skipBuild("Required 64-bit cross-building or native toolchain could not be found.") diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf index bdd81d33762e0598025e7b6307896c6c71d321c5..97cf96a78c26c8ae7dd4326c6fbfcd0beabfa496 100644 --- a/mkspecs/features/platform.prf +++ b/mkspecs/features/platform.prf @@ -1,4 +1,5 @@ -include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) +include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) +QT_FOR_CONFIG += buildtools-private defineTest(isQtMinimum) { !equals(QT_MAJOR_VERSION, $$1): return(false) diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json new file mode 100644 index 0000000000000000000000000000000000000000..0060acac40bcffbd5c71f881c46769b50626061e --- /dev/null +++ b/src/buildtools/configure.json @@ -0,0 +1,716 @@ +{ + "module": "buildtools", + "depends": [ + "core-private", + "gui-private", + "printsupport" + ], + "commandline": { + "options": { + "webengine-core": "boolean", + "webengine-jumbo-build": { "type": "optionalString", "name": "merge_limit"} + } + }, + "libraries": { + "webengine-dbus": { + "label": "d-bus", + "sources": [ + { "type": "pkgConfig", "args": "dbus-1" } + ] + }, + "webengine-fontconfig": { + "label": "fontconfig", + "sources": [ + { "type": "pkgConfig", "args": "fontconfig" } + ] + }, + "webengine-libdrm": { + "label": "libdrm", + "sources": [ + { "type": "pkgConfig", "args": "libdrm" } + ] + }, + "webengine-xcomposite": { + "label": "xcomposite", + "sources": [ + { "type": "pkgConfig", "args": "xcomposite" } + ] + }, + "webengine-xcursor": { + "label": "xcursor", + "sources": [ + { "type": "pkgConfig", "args": "xcursor" } + ] + }, + "webengine-xi": { + "label": "xi", + "sources": [ + { "type": "pkgConfig", "args": "xi" } + ] + }, + "webengine-xtst": { + "label": "xtst", + "sources": [ + { "type": "pkgConfig", "args": "xtst" } + ] + }, + "webengine-nss": { + "label": "nss >= 3.26", + "sources": [ + { "type": "pkgConfig", "args": "nss >= 3.26" } + ] + }, + "webengine-x11" : { + "label" : "x11", + "sources": [ + { "type": "pkgConfig", "args": "x11" } + ] + }, + "webengine-glib": { + "label": "glib-2.0 >= 2.32.0", + "sources": [ + { "type": "pkgConfig", "args": "glib-2.0 >= 2.32.0" } + ] + }, + "webengine-harfbuzz": { + "label": "harfbuzz >= 2.2.0", + "sources": [ + { "type": "pkgConfig", "args": "harfbuzz >= 2.2.0" } + ] + }, + "webengine-jpeglib": { + "label": "compatible jpeglib", + "type": "compile", + "test": { + "head": [ + "#include <cstdio>", + "#include <cstring>", + "extern \"C\" {", + " #include <jpeglib.h>", + "}" + ], + "main": [ + "JDIMENSION dummy;", + "jpeg_crop_scanline(nullptr, &dummy, &dummy);", + "jpeg_skip_scanlines(nullptr, dummy);" + ] + }, + "sources": [ + { "type": "pkgConfig", "args": "libjpeg" }, + "-ljpeg" + ] + }, + "webengine-jsoncpp": { + "label": "jsoncpp", + "sources": [ + { "type": "pkgConfig", "args": "jsoncpp" } + ] + }, + "webengine-libevent": { + "label": "libevent", + "sources": [ + { "type": "pkgConfig", "args": "libevent" } + ] + }, + "webengine-minizip": { + "label": "minizip", + "sources": [ + { "type": "pkgConfig", "args": "minizip" } + ] + }, + "webengine-png": { + "label": "libpng >= 1.6.0", + "sources": [ + { "type": "pkgConfig", "args": "libpng >= 1.6.0" } + ] + }, + "webengine-protobuf": { + "label": "protobuf", + "sources": [ + { "type": "pkgConfig", "args": "protobuf" } + ] + }, + "webengine-zlib": { + "label": "zlib", + "sources": [ + { "type": "pkgConfig", "args": "zlib" } + ] + }, + "webengine-re2": { + "label": "re2", + "test" : { + "main": [ + "std::string s;", + "RE2 re2(s);" + ] + }, + "headers": "re2/re2.h", + "sources": [ + { "type": "pkgConfig", "args": "re2" } + ] + }, + "webengine-icu": { + "label": "icu >= 63", + "sources": [ + { "type": "pkgConfig", "args": "icu-uc >= 63 icu-i18n >= 63" } + ] + }, + "webengine-webp": { + "label": "libwebp, libwebpmux and libwebpdemux", + "sources": [ + { "type": "pkgConfig", "args": "libwebp libwebpmux libwebpdemux" } + ] + }, + "webengine-lcms2": { + "label": "lcms2", + "sources": [ + { "type": "pkgConfig", "args": "lcms2" } + ] + }, + "webengine-freetype": { + "label": "freetype >= 2.4.2", + "test": { + "head": [ + "#include <ft2build.h>", + "#include FT_FREETYPE_H", + "#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20402)", + "# error This version of freetype is too old.", + "#endif" + ], + "main": [ + "FT_Face ft_face = 0;", + "FT_Reference_Face(ft_face);" + ] + }, + "sources": [ + { "type": "pkgConfig", "args": "freetype2" } + ] + }, + "webengine-libxml2": { + "label": "compatible libxml2 and libxslt", + "type": "compile", + "test": { + "tail": [ + "#if !defined(LIBXML_ICU_ENABLED)", + "#error libxml icu not enabled", + "#endif" + ] + }, + "headers": "libxml/xmlversion.h", + "sources": [ + { "type": "pkgConfig", "args": "libxml-2.0 libxslt" } + ] + }, + "webengine-libdrm": { + "label": "libdrm", + "sources": [ + { "type": "pkgConfig", "args": "libdrm" } + ] + }, + "webengine-xcomposite": { + "label": "xcomposite", + "sources": [ + { "type": "pkgConfig", "args": "xcomposite" } + ] + }, + "webengine-xcursor": { + "label": "xcursor", + "sources": [ + { "type": "pkgConfig", "args": "xcursor" } + ] + }, + "webengine-xi": { + "label": "xi", + "sources": [ + { "type": "pkgConfig", "args": "xi" } + ] + }, + "webengine-xtst": { + "label": "xtst", + "sources": [ + { "type": "pkgConfig", "args": "xtst" } + ] + }, + "webengine-ffmpeg": { + "label": "libavcodec libavformat libavutil", + "sources": [ + { "type": "pkgConfig", "args": "libavcodec libavformat libavutil" } + ] + }, + "webengine-opus": { + "label": "opus", + "sources": [ + { "type": "pkgConfig", "args": "opus" } + ] + }, + "webengine-snappy": { + "label": "snappy", + "test": { + "main": [ + "snappy::Source *src = 0;", + "snappy::Sink *sink = 0;" + ] + }, + "headers": "snappy.h", + "sources": [ + "-lsnappy" + ] + }, + "webengine-libvpx": { + "label": "libvpx", + "test": { + "main": [ + "vpx_codec_cx_pkt pkt;", + "pkt.data.frame.width[0] = 0u;", + "pkt.data.frame.height[0] = 0u;" + ] + }, + "headers": "vpx/vpx_encoder.h", + "sources": [ + { "type": "pkgConfig", "args": "vpx" }, + "-lvpx" + ] + } + }, + + "testDir": "config.tests", + "tests" : { + "webengine-bison": { + "label": "bison", + "type": "detectBison" + }, + "webengine-flex": { + "label": "flex", + "type": "detectFlex" + }, + "webengine-gn": { + "label": "system gn", + "type": "detectGn" + }, + "webengine-glibc": { + "label": "glibc > 2.26", + "type": "compile", + "test": { + "include": "features.h", + "tail": [ + "#if __GLIBC__ < 2 || __GLIBC_MINOR__ < 27", + "#error glibc versions below 2.27 are not supported", + "#endif" + ] + } + }, + "webengine-gperf": { + "label": "gperf", + "type": "detectGperf" + }, + "webengine-khr": { + "label": "khr", + "type": "compile", + "test": { + "include": "KHR/khrplatform.h", + "qmake" : [ + "!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL", + "!isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL" + ] + } + }, + "webengine-ninja": { + "label": "system ninja", + "type": "detectNinja" + }, + "webengine-python2": { + "label": "python2", + "type": "detectPython2", + "log": "location" + }, + "webengine-winversion": { + "label": "winversion", + "type": "compile", + "test": { + "head" : [ + "#if !defined(__clang__) && _MSC_FULL_VER < 191426428", + "#error unsupported Visual Studio version", + "#endif" + ] + } + }, + "webengine-host-pkg-config": { + "label": "host pkg-config", + "type": "detectHostPkgConfig", + "log": "path" + }, + "webengine-jumbo-build": { + "label": "jumbo build merge limit", + "type": "detectJumboBuild", + "log": "merge_limit" + }, + "webengine-protoc": { + "label": "protoc", + "type": "detectProtoc" + }, + "webengine-win-compiler64": { + "label": "64bit compiler", + "type": "isWindowsHostCompiler64" + } + }, + "features": { + "webengine-core": { + "label": "Support Qt WebEngine Core", + "purpose": "Provides WebEngine Core support.", + "condition": "module.gui + && features.webengine-python2 + && features.webengine-gperf + && features.webengine-bison + && features.webengine-flex + && (!features.xcb || features.webengine-ozone-x11)", + "output": [ "privateFeature" ] + }, + "webengine-python2": { + "label": "python2", + "condition": "tests.webengine-python2", + "output": [ + "privateFeature", + { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } + ] + }, + "webengine-gperf": { + "label": "gperf", + "condition": "tests.webengine-gperf", + "output": [ "privateFeature" ] + }, + "webengine-bison": { + "label": "bison", + "condition": "tests.webengine-bison", + "output": [ "privateFeature" ] + }, + "webengine-flex": { + "label": "flex", + "condition": "tests.webengine-flex", + "output": [ "privateFeature" ] + }, + "webengine-system-ninja": { + "label": "Use System Ninja", + "condition": "tests.webengine-ninja", + "output": [ "privateFeature" ] + }, + "webengine-system-fontconfig": { + "label": "fontconfig", + "condition": "libs.webengine-fontconfig", + "output": [ "privateFeature" ] + }, + "webengine-system-dbus": { + "label": "dbus", + "condition": "libs.webengine-dbus", + "output": [ "privateFeature" ] + }, + "webengine-system-libdrm": { + "label": "libdrm", + "condition": "libs.webengine-libdrm", + "output": [ "privateFeature" ] + }, + "webengine-system-xcomposite": { + "label": "xcomposite", + "condition": "libs.webengine-xcomposite", + "output": [ "privateFeature" ] + }, + "webengine-system-xcursor": { + "label": "xcursor", + "condition": "libs.webengine-xcursor", + "output": [ "privateFeature" ] + }, + "webengine-system-xi": { + "label": "xi", + "condition": "libs.webengine-xi", + "output": [ "privateFeature" ] + }, + "webengine-system-xtst": { + "label": "xtst", + "condition": "libs.webengine-xtst", + "output": [ "privateFeature" ] + }, + "webengine-system-gn": { + "label": "Use System Gn", + "autoDetect": "false", + "condition": "tests.webengine-gn", + "output": [ "privateFeature" ] + }, + "webengine-system-khr" : { + "label": "khr", + "condition": "config.unix && tests.webengine-khr", + "output": [ "privateFeature" ] + }, + "webengine-system-nss": { + "label": "nss", + "condition": "config.unix && !config.darwin && libs.webengine-nss", + "output": [ "privateFeature" ] + }, + "webengine-system-glibc": { + "label": "glibc", + "condition": "config.linux && tests.webengine-glibc", + "output": [ "privateFeature" ] + }, + "webengine-system-x11" : { + "label": "x11", + "condition": "config.unix && libs.webengine-x11", + "output": [ "privateFeature" ] + }, + "webengine-host-pkg-config": { + "label": "host-pkg-config", + "condition": "config.unix && tests.webengine-host-pkg-config", + "output": [ + "privateFeature", + { "type": "varAssign", "name": "QMAKE_PKG_CONFIG_HOST", "value": "tests.webengine-host-pkg-config.path" } + ] + }, + "webengine-ozone-x11" : { + "label": "Support qpa-xcb", + "condition": "config.unix + && features.xcb + && features.webengine-system-x11 + && features.webengine-system-libdrm + && features.webengine-system-xcomposite + && features.webengine-system-xcursor + && features.webengine-system-xi + && features.webengine-system-xtst", + "output": [ "privateFeature" ] + }, + "webengine-jumbo-build": { + "label": "jumbo build merge batch", + "condition": "tests.webengine-jumbo-build", + "output": [ + "privateFeature", + { "type": "varAssign", "name": "QMAKE_JUMBO_MERGE_LIMIT", "value": "tests.webengine-jumbo-build.merge_limit" } + ] + }, + "webengine-system-libdrm": { + "label": "libdrm", + "condition": "libs.webengine-libdrm", + "output": [ "privateFeature" ] + }, + "webengine-system-xcomposite": { + "label": "xcomposite", + "condition": "libs.webengine-xcomposite", + "output": [ "privateFeature" ] + }, + "webengine-system-xcursor": { + "label": "xcursor", + "condition": "libs.webengine-xcursor", + "output": [ "privateFeature" ] + }, + "webengine-system-xi": { + "label": "xi", + "condition": "libs.webengine-xi", + "output": [ "privateFeature" ] + }, + "webengine-system-xtst": { + "label": "xtst", + "condition": "libs.webengine-xtst", + "output": [ "privateFeature" ] + }, + "webengine-system-harfbuzz": { + "label": "harfbuzz", + "condition": "config.unix && features.system-harfbuzz && libs.webengine-harfbuzz", + "output": [ "privateFeature" ] + }, + "webengine-system-glib" : { + "label": "glib", + "condition": "config.unix && libs.webengine-glib", + "output": [ "privateFeature" ] + }, + "webengine-system-minizip" : { + "label": "minizip", + "condition": "config.unix && libs.webengine-minizip", + "output": [ "privateFeature" ] + }, + "webengine-system-zlib" : { + "label": "zlib", + "condition": "config.unix && features.system-zlib && libs.webengine-zlib", + "output": [ "privateFeature" ] + }, + "webengine-system-libevent" : { + "label": "libevent", + "condition": "config.unix && libs.webengine-libevent", + "output": [ "privateFeature" ] + }, + "webengine-system-jsoncpp" : { + "label": "jsoncpp", + "condition": "config.unix && libs.webengine-jsoncpp", + "output": [ "privateFeature" ] + }, + "webengine-system-protobuf" : { + "label": "protobuf", + "condition": "config.unix && libs.webengine-protobuf && tests.webengine-protoc", + "output": [ "privateFeature" ] + }, + "webengine-system-png" : { + "label": "png", + "condition": "config.unix && features.system-png && libs.webengine-png", + "output": [ "privateFeature" ] + }, + "webengine-system-jpeg" : { + "label": "JPEG", + "condition": "config.unix && features.system-jpeg && libs.webengine-jpeglib", + "output": [ "privateFeature" ] + }, + "webengine-system-re2": { + "label": "re2", + "condition": "config.unix && libs.webengine-re2", + "output": [ "privateFeature" ] + }, + "webengine-system-icu": { + "label": "icu", + "autoDetect": "false", + "condition": "libs.webengine-icu", + "output": [ "privateFeature" ] + }, + "webengine-system-libwebp": { + "label": "libwebp, libwebpmux and libwebpdemux", + "condition": "config.unix && libs.webengine-webp", + "output": [ "privateFeature" ] + }, + "webengine-system-opus": { + "label": "opus", + "condition": "config.unix && libs.webengine-opus", + "output": [ "privateFeature" ] + }, + "webengine-system-ffmpeg": { + "label": "ffmpeg", + "autoDetect": "false", + "condition": "libs.webengine-ffmpeg && features.webengine-system-opus && features.webengine-system-libwebp", + "output": [ "privateFeature" ] + }, + "webengine-system-libxml2": { + "label": "libxml2 and libxslt", + "condition": "config.unix && libs.webengine-libxml2", + "output": [ "privateFeature" ] + }, + "webengine-system-lcms2" : { + "label": "lcms2", + "condition": "config.unix && libs.webengine-lcms2", + "output": [ "privateFeature" ] + }, + "webengine-system-freetype" : { + "label": "freetype", + "condition": "config.unix && features.system-freetype && libs.webengine-freetype", + "output": [ "privateFeature" ] + }, + "webengine-system-libvpx" : { + "label": "libvpx", + "condition": "config.unix && libs.webengine-libvpx", + "output": [ "privateFeature" ] + }, + "webengine-system-snappy" : { + "label": "snappy", + "condition": "config.unix && libs.webengine-snappy", + "output": [ "privateFeature" ] + }, + "webengine-winversion" : { + "label": "winversion", + "condition": "config.win32 && tests.webengine-winversion", + "output": [ "privateFeature" ] + }, + "webengine-win-compiler64": { + "label": "64bit compiler", + "condition": "config.win32 && tests.webengine-win-compiler64", + "output": [ "privateFeature" ] + } + }, + "report": [ + { + "type": "warning", + "condition": "!module.gui", + "message": "QtWebEngine requires QtGui." + }, + { + "type": "warning", + "condition": "!features.webengine-python2", + "message": "Python version 2 (2.7.5 or later) is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.webengine-gperf", + "message": "gperf is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.webengine-bison", + "message": "bison is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.webengine-flex", + "message": "flex is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "config.linux && !features.webengine-ozone-x11 && features.xcb", + "message": "Could not find all necessary libraries for qpa-xcb support." + }, + { + "type": "warning", + "condition": "config.win32 && !features.webengine-win-compiler64", + "message": "64-bit cross-building or native toolchain is required to build QtWebEngine." + } + ], + "summary": [ + { + "section": "Qt WebEngine Build Tools", + "entries": [ + "webengine-system-ninja", + "webengine-system-gn", + { + "message": "Jumbo Build Merge Limit", + "type": "jumboBuild" + }, + { + "section": "Required system libraries", + "condition": "config.unix && !config.macos && features.webengine-core", + "entries": [ + "webengine-system-fontconfig", + "webengine-system-dbus", + "webengine-system-nss", + "webengine-system-khr", + "webengine-system-glibc" + ] + }, + { + "section": "Required system libraries for qpa-xcb", + "condition": "config.unix && !config.macos && features.webengine-core", + "entries": [ + "webengine-system-x11", + "webengine-system-libdrm", + "webengine-system-xcomposite", + "webengine-system-xcursor", + "webengine-system-xi", + "webengine-system-xtst" + ] + }, + { + "section": "Optional system libraries used", + "condition": "config.unix", + "entries": [ + "webengine-system-re2", + "webengine-system-icu", + "webengine-system-libwebp", + "webengine-system-opus", + "webengine-system-ffmpeg", + "webengine-system-libvpx", + "webengine-system-snappy", + "webengine-system-glib", + "webengine-system-zlib", + "webengine-system-minizip", + "webengine-system-libevent", + "webengine-system-jsoncpp", + "webengine-system-protobuf", + "webengine-system-libxml2", + "webengine-system-lcms2", + "webengine-system-png", + "webengine-system-jpeg", + "webengine-system-harfbuzz", + "webengine-system-freetype" + ] + } + ] + } + ] +} diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro index 6b0a41fbe7d09114266f06af933e585c279c26c0..033202e6eab57dc3272104f18b4b1fa9fb27ae1f 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -3,8 +3,8 @@ option(host_build) !debug_and_release: CONFIG += release -include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) -QT_FOR_CONFIG += webenginecore-private +include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) +QT_FOR_CONFIG += buildtools-private build_pass|!debug_and_release { !qtConfig(webengine-system-gn): CONFIG(release, debug|release) { diff --git a/src/buildtools/ninja.pro b/src/buildtools/ninja.pro index dee285b7e12c686593116b99c41c83eaa9cbb4c2..66a6d5aa6f365f3853054798b3efa178c62f4ffc 100644 --- a/src/buildtools/ninja.pro +++ b/src/buildtools/ninja.pro @@ -2,8 +2,8 @@ TEMPLATE = aux !debug_and_release: CONFIG += release -include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) -QT_FOR_CONFIG += webenginecore-private +include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) +QT_FOR_CONFIG += buildtools-private build_pass|!debug_and_release { !qtConfig(webengine-system-ninja): CONFIG(release, debug|release) { diff --git a/src/core/config/common.pri b/src/core/config/common.pri index df8aeb1ccf6f231271079a005ad65a6814910be2..1a54f1559995a7e54d1bdfdaae3516787d0167a5 100644 --- a/src/core/config/common.pri +++ b/src/core/config/common.pri @@ -1,6 +1,7 @@ # Shared configuration for all our supported platforms +include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) -QT_FOR_CONFIG += webenginecore +QT_FOR_CONFIG += buildtools-private webenginecore webenginecore-private gn_args += \ use_qt=true \ diff --git a/src/core/configure.json b/src/core/configure.json index a93132326cca270e90c84370b90f065acea7579a..cf01b9914894d64d38d58a1f3da20c31d4dd6ecd 100644 --- a/src/core/configure.json +++ b/src/core/configure.json @@ -1,6 +1,7 @@ { "module": "webenginecore", "depends": [ + "buildtools-private", "core-private", "gui-private", "printsupport" @@ -56,78 +57,6 @@ "sources" : [{ "type": "pkgConfig", "args": "alsa" } ] }, - "webengine-libdrm": { - "label": "libdrm", - "sources": [ - { "type": "pkgConfig", "args": "libdrm" } - ] - }, - "webengine-xcomposite": { - "label": "xcomposite", - "sources": [ - { "type": "pkgConfig", "args": "xcomposite" } - ] - }, - "webengine-xcursor": { - "label": "xcursor", - "sources": [ - { "type": "pkgConfig", "args": "xcursor" } - ] - }, - "webengine-xi": { - "label": "xi", - "sources": [ - { "type": "pkgConfig", "args": "xi" } - ] - }, - "webengine-xtst": { - "label": "xtst", - "sources": [ - { "type": "pkgConfig", "args": "xtst" } - ] - }, - "webengine-harfbuzz": { - "label": "harfbuzz >= 2.2.0", - "sources": [ - { "type": "pkgConfig", "args": "harfbuzz >= 2.2.0" } - ] - }, - "webengine-glib": { - "label": "glib-2.0 >= 2.32.0", - "sources": [ - { "type": "pkgConfig", "args": "glib-2.0 >= 2.32.0" } - ] - }, - "webengine-zlib": { - "label": "zlib", - "sources": [ - { "type": "pkgConfig", "args": "zlib" } - ] - }, - "webengine-minizip": { - "label": "minizip", - "sources": [ - { "type": "pkgConfig", "args": "minizip" } - ] - }, - "webengine-libevent": { - "label": "libevent", - "sources": [ - { "type": "pkgConfig", "args": "libevent" } - ] - }, - "webengine-jsoncpp": { - "label": "jsoncpp", - "sources": [ - { "type": "pkgConfig", "args": "jsoncpp" } - ] - }, - "webengine-protobuf": { - "label": "protobuf", - "sources": [ - { "type": "pkgConfig", "args": "protobuf" } - ] - }, "webengine-poppler-cpp": { "label": "poppler-cpp", "sources": [ @@ -139,139 +68,6 @@ "sources": [ { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" } ] - }, - "webengine-re2": { - "label": "re2", - "test" : { - "main": [ - "std::string s;", - "RE2 re2(s);" - ] - }, - "headers": "re2/re2.h", - "sources": [ - { "type": "pkgConfig", "args": "re2" } - ] - }, - "webengine-icu": { - "label": "icu >= 63", - "sources": [ - { "type": "pkgConfig", "args": "icu-uc >= 63 icu-i18n >= 63" } - ] - }, - "webengine-ffmpeg": { - "label": "libavcodec libavformat libavutil", - "sources": [ - { "type": "pkgConfig", "args": "libavcodec libavformat libavutil" } - ] - }, - "webengine-opus": { - "label": "opus", - "sources": [ - { "type": "pkgConfig", "args": "opus" } - ] - }, - "webengine-webp": { - "label": "libwebp, libwebpmux and libwebpdemux", - "sources": [ - { "type": "pkgConfig", "args": "libwebp libwebpmux libwebpdemux" } - ] - }, - "webengine-png": { - "label": "libpng >= 1.6.0", - "sources": [ - { "type": "pkgConfig", "args": "libpng >= 1.6.0" } - ] - }, - "webengine-jpeglib": { - "label": "compatible jpeglib", - "type": "compile", - "test": { - "head": [ - "#include <cstdio>", - "#include <cstring>", - "extern \"C\" {", - " #include <jpeglib.h>", - "}" - ], - "main": [ - "JDIMENSION dummy;", - "jpeg_crop_scanline(nullptr, &dummy, &dummy);", - "jpeg_skip_scanlines(nullptr, dummy);" - ] - }, - "sources": [ - { "type": "pkgConfig", "args": "libjpeg" }, - "-ljpeg" - ] - }, - "webengine-libxml2": { - "label": "compatible libxml2 and libxslt", - "type": "compile", - "test": { - "tail": [ - "#if !defined(LIBXML_ICU_ENABLED)", - "#error libxml icu not enabled", - "#endif" - ] - }, - "headers": "libxml/xmlversion.h", - "sources": [ - { "type": "pkgConfig", "args": "libxml-2.0 libxslt" } - ] - }, - "webengine-lcms2": { - "label": "lcms2", - "sources": [ - { "type": "pkgConfig", "args": "lcms2" } - ] - }, - "webengine-freetype": { - "label": "freetype >= 2.4.2", - "test": { - "head": [ - "#include <ft2build.h>", - "#include FT_FREETYPE_H", - "#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20402)", - "# error This version of freetype is too old.", - "#endif" - ], - "main": [ - "FT_Face ft_face = 0;", - "FT_Reference_Face(ft_face);" - ] - }, - "sources": [ - { "type": "pkgConfig", "args": "freetype2" } - ] - }, - "webengine-snappy": { - "label": "snappy", - "test": { - "main": [ - "snappy::Source *src = 0;", - "snappy::Sink *sink = 0;" - ] - }, - "headers": "snappy.h", - "sources": [ - "-lsnappy" - ] - }, - "webengine-libvpx": { - "label": "libvpx", - "test": { - "main": [ - "vpx_codec_cx_pkt pkt;", - "pkt.data.frame.width[0] = 0u;", - "pkt.data.frame.height[0] = 0u;" - ] - }, - "headers": "vpx/vpx_encoder.h", - "sources": [ - { "type": "pkgConfig", "args": "vpx" }, - "-lvpx" - ] } }, "tests" : { @@ -281,10 +77,6 @@ "host": "true", "type": "compile" }, - "webengine-protoc": { - "label": "protoc", - "type": "detectProtoc" - }, "webengine-host-pkg-config": { "label": "host pkg-config", "type": "detectHostPkgConfig", @@ -294,18 +86,10 @@ "label": "embedded build", "type": "detectEmbedded" }, - "webengine-developer-build": { - "label": "developer build", - "type": "detectDeveloperBuild" - }, "webengine-sanitizer": { "label" : "sanitizer support", "type": "isSanitizerSupported" }, - "webengine-win-compiler64": { - "label": "64bit compiler", - "type": "isWindowsHostCompiler64" - }, "webengine-arm-thumb" : { "label": "thumb instruction set", "type": "hasThumbFlag" @@ -321,76 +105,6 @@ } }, "features": { - "webengine-system-libdrm": { - "label": "libdrm", - "condition": "libs.webengine-libdrm", - "output": [ "privateFeature" ] - }, - "webengine-system-xcomposite": { - "label": "xcomposite", - "condition": "libs.webengine-xcomposite", - "output": [ "privateFeature" ] - }, - "webengine-system-xcursor": { - "label": "xcursor", - "condition": "libs.webengine-xcursor", - "output": [ "privateFeature" ] - }, - "webengine-system-xi": { - "label": "xi", - "condition": "libs.webengine-xi", - "output": [ "privateFeature" ] - }, - "webengine-system-xtst": { - "label": "xtst", - "condition": "libs.webengine-xtst", - "output": [ "privateFeature" ] - }, - "webengine-system-harfbuzz": { - "label": "harfbuzz", - "condition": "config.unix && features.system-harfbuzz && libs.webengine-harfbuzz", - "output": [ "privateFeature" ] - }, - "webengine-system-glib" : { - "label": "glib", - "condition": "config.unix && libs.webengine-glib", - "output": [ "privateFeature" ] - }, - "webengine-system-minizip" : { - "label": "minizip", - "condition": "config.unix && libs.webengine-minizip", - "output": [ "privateFeature" ] - }, - "webengine-system-zlib" : { - "label": "zlib", - "condition": "config.unix && features.system-zlib && libs.webengine-zlib", - "output": [ "privateFeature" ] - }, - "webengine-system-libevent" : { - "label": "libevent", - "condition": "config.unix && libs.webengine-libevent", - "output": [ "privateFeature" ] - }, - "webengine-system-jsoncpp" : { - "label": "jsoncpp", - "condition": "config.unix && libs.webengine-jsoncpp", - "output": [ "privateFeature" ] - }, - "webengine-system-protobuf" : { - "label": "protobuf", - "condition": "config.unix && libs.webengine-protobuf && tests.webengine-protoc", - "output": [ "privateFeature" ] - }, - "webengine-system-png" : { - "label": "png", - "condition": "config.unix && features.system-png && libs.webengine-png", - "output": [ "privateFeature" ] - }, - "webengine-system-jpeg" : { - "label": "JPEG", - "condition": "config.unix && features.system-jpeg && libs.webengine-jpeglib", - "output": [ "privateFeature" ] - }, "webengine-embedded-build": { "label": "Embedded build", "purpose": "Enables the embedded build configuration.", @@ -402,7 +116,7 @@ "webengine-developer-build": { "label": "Developer build", "purpose": "Enables the developer build configuration.", - "autoDetect": "tests.webengine-developer-build", + "autoDetect": "features.private_tests", "output": [ "privateFeature" ] }, "webengine-alsa": { @@ -421,16 +135,6 @@ "condition": "!config.unix || !features.cross_compile || arch.arm64 || tests.webengine-host-compiler", "output": [ "privateFeature" ] }, - "webengine-system-libvpx" : { - "label": "libvpx", - "condition": "config.unix && libs.webengine-libvpx", - "output": [ "privateFeature" ] - }, - "webengine-system-snappy" : { - "label": "snappy", - "condition": "config.unix && libs.webengine-snappy", - "output": [ "privateFeature" ] - }, "webengine-geolocation": { "label": "Geolocation", "condition": "module.positioning", @@ -507,52 +211,6 @@ "autoDetect": "!features.webengine-embedded-build", "output": [ "privateFeature" ] }, - "webengine-system-libwebp": { - "label": "libwebp, libwebpmux and libwebpdemux", - "autoDetect": "config.unix", - "condition": "libs.webengine-webp", - "output": [ "privateFeature" ] - }, - "webengine-system-opus": { - "label": "opus", - "autoDetect": "config.unix", - "condition": "libs.webengine-opus", - "output": [ "privateFeature" ] - }, - "webengine-system-ffmpeg": { - "label": "ffmpeg", - "autoDetect": false, - "condition": "libs.webengine-ffmpeg && features.webengine-system-opus && features.webengine-system-libwebp", - "output": [ "privateFeature" ] - }, - "webengine-system-icu": { - "label": "icu", - "autoDetect": false, - "condition": "libs.webengine-icu", - "output": [ "privateFeature" ] - }, - "webengine-system-re2": { - "label": "re2", - "autoDetect": "config.unix", - "condition": "libs.webengine-re2", - "output": [ "privateFeature" ] - }, - "webengine-system-libxml2": { - "label": "libxml2 and libxslt", - "condition": "config.unix && libs.webengine-libxml2", - "output": [ "privateFeature" ] - }, - "webengine-system-lcms2" : { - "label": "lcms2", - "autoDetect": "features.webengine-printing-and-pdf", - "condition": "config.unix && libs.webengine-lcms2", - "output": [ "privateFeature" ] - }, - "webengine-system-freetype" : { - "label": "freetype", - "condition": "config.unix && features.system-freetype && libs.webengine-freetype", - "output": [ "privateFeature" ] - }, "webengine-ozone-x11" : { "label": "Support qpa-xcb", "condition": "config.unix @@ -576,11 +234,6 @@ "condition": "libs.webengine-poppler-cpp", "output": [ "privateFeature" ] }, - "webengine-win-compiler64": { - "label": "64bit compiler", - "condition": "config.win32 && tests.webengine-win-compiler64", - "output": [ "privateFeature" ] - }, "webengine-arm-thumb": { "label": "Thumb instruction set", "condition": "config.linux && features.webengine-embedded-build && arch.arm && tests.webengine-arm-thumb", @@ -614,11 +267,6 @@ "condition": "config.unix && !features.webengine-host-pkg-config", "message": "host pkg-config not found" }, - { - "type": "warning", - "condition": "config.win32 && !features.webengine-win-compiler64", - "message": "64-bit cross-building or native toolchain is required to build QtWebEngine." - }, { "type": "warning", "condition": "config.linux && features.webengine-embedded-build && !features.webengine-system-ffmpeg && arch.arm && !features.webengine-arm-thumb", @@ -632,31 +280,6 @@ ], "summary": [ - { - "section": "Optional system libraries used", - "condition": "config.unix", - "entries": [ - "webengine-system-re2", - "webengine-system-icu", - "webengine-system-libwebp", - "webengine-system-opus", - "webengine-system-ffmpeg", - "webengine-system-libvpx", - "webengine-system-snappy", - "webengine-system-glib", - "webengine-system-zlib", - "webengine-system-minizip", - "webengine-system-libevent", - "webengine-system-jsoncpp", - "webengine-system-protobuf", - "webengine-system-libxml2", - "webengine-system-lcms2", - "webengine-system-png", - "webengine-system-jpeg", - "webengine-system-harfbuzz", - "webengine-system-freetype" - ] - }, { "section": "Qt WebEngineCore", "condition": "features.webengine-core", diff --git a/src/core/core_common.pri b/src/core/core_common.pri index c92278657417ff8ce89709e939fc18ce45062d26..2a9dc90c0454e6bad585e6f68035a5d7bc892134 100644 --- a/src/core/core_common.pri +++ b/src/core/core_common.pri @@ -1,5 +1,6 @@ +include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) -QT_FOR_CONFIG += webenginecore webenginecore-private +QT_FOR_CONFIG += buildtools-private webenginecore webenginecore-private # NOTE: The TARGET, QT, QT_PRIVATE variables are used in both core_module.pro and core_gyp_generator.pro # gyp/ninja will take care of the compilation, qmake/make will finish with linking and install. diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index 94c1ede1cdad12e67280be8460f56380e5c65bc2..377d8363ce519b5d133de963427d52ec10ff21e1 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -1,6 +1,6 @@ -include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) +include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) -QT_FOR_CONFIG += webenginecore-private core-private gui-private +QT_FOR_CONFIG += buildtools-private webenginecore-private core-private gui-private TEMPLATE = aux diff --git a/src/src.pro b/src/src.pro index 1ace7a44b462f14234905dc0f54446e8ed20e3ca..99967fd8277d2b7bdd2713b3b165d7666da3a3c7 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,6 +1,7 @@ load(platform) -include($$QTWEBENGINE_OUT_ROOT/src/qtwebengine-main-config.pri) +include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri) +QT_FOR_CONFIG += buildtools-private TEMPLATE = subdirs