diff options
Diffstat (limited to 'tools/qmake')
-rw-r--r-- | tools/qmake/config.tests/khr/khr.cpp | 4 | ||||
-rw-r--r-- | tools/qmake/config.tests/khr/khr.pro | 4 | ||||
-rw-r--r-- | tools/qmake/config.tests/snappy/snappy.cpp | 44 | ||||
-rw-r--r-- | tools/qmake/config.tests/snappy/snappy.pro | 3 | ||||
-rw-r--r-- | tools/qmake/config.tests/srtp/srtp.cpp | 43 | ||||
-rw-r--r-- | tools/qmake/config.tests/srtp/srtp.pro | 3 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/configure.prf | 91 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/default_post.prf | 3 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/default_pre.prf | 4 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 31 |
10 files changed, 211 insertions, 19 deletions
diff --git a/tools/qmake/config.tests/khr/khr.cpp b/tools/qmake/config.tests/khr/khr.cpp index 6182df286..01c0c26ca 100644 --- a/tools/qmake/config.tests/khr/khr.cpp +++ b/tools/qmake/config.tests/khr/khr.cpp @@ -38,7 +38,5 @@ int main(int, char **) { - const khronos_boolean_enum_t kfalse = KHRONOS_FALSE; - const khronos_boolean_enum_t ktrue = KHRONOS_TRUE; - return kfalse == ktrue; + return 0; } diff --git a/tools/qmake/config.tests/khr/khr.pro b/tools/qmake/config.tests/khr/khr.pro index 6abd2367a..b8e935f5a 100644 --- a/tools/qmake/config.tests/khr/khr.pro +++ b/tools/qmake/config.tests/khr/khr.pro @@ -1,2 +1,6 @@ +!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL +!isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL + CONFIG-=qt + linux:SOURCES += khr.cpp diff --git a/tools/qmake/config.tests/snappy/snappy.cpp b/tools/qmake/config.tests/snappy/snappy.cpp new file mode 100644 index 000000000..7948303fc --- /dev/null +++ b/tools/qmake/config.tests/snappy/snappy.cpp @@ -0,0 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtWebEngine module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <snappy.h> + +int main(int, char **) +{ + snappy::Source* src = 0; + snappy::Sink* sink = 0; + return 0; +} diff --git a/tools/qmake/config.tests/snappy/snappy.pro b/tools/qmake/config.tests/snappy/snappy.pro new file mode 100644 index 000000000..890174a13 --- /dev/null +++ b/tools/qmake/config.tests/snappy/snappy.pro @@ -0,0 +1,3 @@ +linux:SOURCES += snappy.cpp +LIBS += -lsnappy +CONFIG -= qt diff --git a/tools/qmake/config.tests/srtp/srtp.cpp b/tools/qmake/config.tests/srtp/srtp.cpp new file mode 100644 index 000000000..12400f126 --- /dev/null +++ b/tools/qmake/config.tests/srtp/srtp.cpp @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtWebEngine module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <srtp/srtp.h> + +int main(int, char **) +{ + err_status_t status = srtp_init(); + return status == err_status_ok; +} diff --git a/tools/qmake/config.tests/srtp/srtp.pro b/tools/qmake/config.tests/srtp/srtp.pro new file mode 100644 index 000000000..2151d64aa --- /dev/null +++ b/tools/qmake/config.tests/srtp/srtp.pro @@ -0,0 +1,3 @@ +linux:SOURCES += srtp.cpp +LIBS += -lsrtp +CONFIG -= qt diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf index 7b111b78f..4be9fac20 100644 --- a/tools/qmake/mkspecs/features/configure.prf +++ b/tools/qmake/mkspecs/features/configure.prf @@ -19,14 +19,93 @@ defineTest(runConfigure) { test ~= s/\\.pro$// qtCompileTest($$test) } - # libcap-dev package doesn't ship .pc files on Ubuntu. - linux:!config_libcap:skipBuild("libcap development package appears to be missing") - linux:!config_khr:skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)") - contains(QT_CONFIG, xcb) { - for(package, $$list("libdrm xcomposite xi xrandr")) { + + linux { + # libcap-dev package doesn't ship .pc files on Ubuntu. + !config_libcap:skipBuild("libcap development package appears to be missing") + !config_khr:skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)") + + REQUIRED_PACKAGES = dbus-1 fontconfig + contains(QT_CONFIG, xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst + contains(QT_CONFIG, pulseaudio): REQUIRED_PACKAGES += libpulse + contains(QT_CONFIG, system-png): REQUIRED_PACKAGES += libpng + contains(QT_CONFIG, system-harfbuzz): REQUIRED_PACKAGES += harfbuzz + !cross_compile: REQUIRED_PACKAGES += libpci + + for(package, $$list($$REQUIRED_PACKAGES)) { !packagesExist($$package):skipBuild("Unmet dependency: $$package") } + packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip + else: log("System zlib or minizip not found. Using Chromium's copies.$${EOL}") + packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp + else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}") + packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt + else: log("System libxml2 or libxslt not found. Using Chromium's copies.$${EOL}") + for(package, $$list("libevent flac jsoncpp opus speex")) { + packagesExist($$package): WEBENGINE_CONFIG += use_system_$$package + else: log("System $$package not found. Using Chromium's copy.$${EOL}") + } + packagesExist("\'vpx >= 1.4\'"): WEBENGINE_CONFIG += use_system_vpx + else: log("System vpx >= 1.4 not found. Using Chromium's copy.$${EOL}") + config_srtp: WEBENGINE_CONFIG += use_system_libsrtp + else: log("System libsrtp not found. Using Chromium's copy.$${EOL}") + config_snappy: WEBENGINE_CONFIG += use_system_snappy + else: log("System snappy not found. Using Chromium's copy.$${EOL}") + + !cross_compile { + packagesExist(nss): WEBENGINE_CONFIG += use_nss + else: log("System NSS not found, BoringSSL will be used.$${EOL}") + } + } + + isEmpty(skipBuildReason): { + cache(CONFIG, add, $$list(webengine_successfully_configured)) + !isEmpty(WEBENGINE_CONFIG) { + cache(WEBENGINE_CONFIG, add, $$list($$WEBENGINE_CONFIG)) + export(WEBENGINE_CONFIG) + } + } +} + +# This is called from default_post, at which point we've also parsed +# command line options +defineTest(finalizeConfigure) { + linux { + use?(nss) { + log("SSL............................... Using system NSS$${EOL}") + } else { + log("SSL............................... Using bundled BoringSSL$${EOL}") + } + use?(system_icu) { + packagesExist("icu-uc icu-i18n") { + log("ICU............................... Using system version$${EOL}") + } else { + log("ICU............................... System ICU not found$${EOL}") + skipBuild("Unmet dependencies: icu-uc, icu-i18n") + } + } else { + log("ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG += use_system_icu)$${EOL}") + } + use?(system_ffmpeg) { + packagesExist("libavcodec libavformat libavutil") { + packagesExist("libwebp, libwebpdemux, opus, \'vpx >= 1.4\'"){ + log("FFMPEG............................ Using system version$${EOL}") + } else { + log("FFMPEG............................ Conflicting FFMPEG dependencies$${EOL}") + skipBuild("Unmet dependencies: opus, vpx, libwebp, libwebpdemux") + } + } else { + log("FFMPEG............................ System FFMPEG not found$${EOL}") + skipBuild("Unmet dependencies: libavcodec, libavformat, libavutil") + } + } else { + log("FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG += use_system_ffmpeg)$${EOL}") + } + } + use?(proprietary_codecs) { + log("Proprietary codecs (H264, MP3).... Enabled$${EOL}") + } else { + log("Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG += use_proprietary_codecs)$${EOL}") } - isEmpty(skipBuildReason):cache(CONFIG, add, $$list(webengine_successfully_configured)) } diff --git a/tools/qmake/mkspecs/features/default_post.prf b/tools/qmake/mkspecs/features/default_post.prf index d09ba05fd..64e8cb1fe 100644 --- a/tools/qmake/mkspecs/features/default_post.prf +++ b/tools/qmake/mkspecs/features/default_post.prf @@ -1,4 +1,7 @@ load(default_post) +load(functions) + +root_project_file:isPlatformSupported(): finalizeConfigure() !isEmpty(skipBuildReason) { SUBDIRS = diff --git a/tools/qmake/mkspecs/features/default_pre.prf b/tools/qmake/mkspecs/features/default_pre.prf index 2e556c2a6..6506e67ad 100644 --- a/tools/qmake/mkspecs/features/default_pre.prf +++ b/tools/qmake/mkspecs/features/default_pre.prf @@ -16,7 +16,9 @@ load(default_pre) load(functions) # Check platform support and run config tests early enough to bail -equals(_PRO_FILE_, "$$QTWEBENGINE_ROOT/qtwebengine.pro"): isPlatformSupported() { +equals(_PRO_FILE_, "$$QTWEBENGINE_ROOT/qtwebengine.pro"): CONFIG += root_project_file + +root_project_file:isPlatformSupported() { load(configure) runConfigure() } diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index cab79ff28..2c75f4984 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -1,5 +1,9 @@ defineTest(isPlatformSupported) { - !win32-msvc2013: !contains(QT_CONFIG, c++11) { + !linux-g++*:!linux-clang:!win32-msvc2013*:!win32-msvc2015*:!macx-clang*:!boot2qt { + skipBuild("Qt WebEngine can currently only be built for Linux (GCC/clang), Windows (MSVC 2013 or 2015), OS X (10.9/XCode 5.1+) or Qt for Device Creation.") + return(false) + } + !contains(QT_CONFIG, c++11) { skipBuild("C++11 support is required in order to build chromium.") return(false) } @@ -7,18 +11,22 @@ defineTest(isPlatformSupported) { skipBuild("Static builds of QtWebEngine aren't supported.") return(false) } - osx:lessThan(QMAKE_XCODE_VERSION, 5.1) { - skipBuild("Using xcode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") - return(false) + osx { + lessThan(QMAKE_XCODE_VERSION, 5.1) { + skipBuild("Using xcode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") + return(false) + } + # We require OS X 10.9 (darwin version 13.0.0) or newer + darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0) + lessThan(darwin_major_version, 13) { + skipBuild("OS X version 10.9 or newer 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) - - skipBuild("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) + return(true) } defineTest(isPythonVersionSupported) { @@ -149,6 +157,11 @@ defineReplace(which) { return($$out) } +defineTest(use?) { + contains(WEBENGINE_CONFIG, use_$$lower($$1)): return(true) + return(false) +} + defineReplace(findOrBuildNinja) { # If NINJA_PATH env var is set, prefer that. # Fallback to locating our own bootstrapped ninja. |