summaryrefslogtreecommitdiffstats
path: root/tools/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmake')
-rw-r--r--tools/qmake/config.tests/khr/khr.cpp4
-rw-r--r--tools/qmake/config.tests/snappy/snappy.cpp44
-rw-r--r--tools/qmake/config.tests/snappy/snappy.pro3
-rw-r--r--tools/qmake/config.tests/srtp/srtp.cpp43
-rw-r--r--tools/qmake/config.tests/srtp/srtp.pro3
-rw-r--r--tools/qmake/mkspecs/features/configure.prf79
-rw-r--r--tools/qmake/mkspecs/features/default_post.prf3
-rw-r--r--tools/qmake/mkspecs/features/default_pre.prf4
-rw-r--r--tools/qmake/mkspecs/features/functions.prf4
9 files changed, 175 insertions, 12 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/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..321e67e92 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -19,14 +19,81 @@ 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-jpeg): REQUIRED_PACKAGES += libjpeg
+ contains(QT_CONFIG, system-harfbuzz): REQUIRED_PACKAGES += harfbuzz
+ !cross_compile: REQUIRED_PACKAGES += libpci nss
+
+ for(package, $$list($$REQUIRED_PACKAGES)) {
!packagesExist($$package):skipBuild("Unmet dependency: $$package")
}
+ packagesExist(minizip, zlib): WEBENGINE_CONFIG += config_system_minizip
+ else: log("System zlib or minizip not found. Using Chromium's copies.$${EOL}")
+ packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += config_system_libwebp
+ else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}")
+ packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += config_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 += config_system_$$package
+ else: log("System $$package not found. Using Chromium's copy.$${EOL}")
+ }
+ packagesExist("\'vpx >= 1.4\'"): WEBENGINE_CONFIG += config_system_vpx
+ else: log("System vpx >= 1.4 not found. Using Chromium's copy.$${EOL}")
+ config_srtp: WEBENGINE_CONFIG += config_system_libsrtp
+ else: log("System libsrtp not found. Using Chromium's copy.$${EOL}")
+ config_snappy: WEBENGINE_CONFIG += config_system_snappy
+ else: log("System snappy not found. Using Chromium's copy.$${EOL}")
+ }
+
+ isEmpty(skipBuildReason): {
+ cache(CONFIG, add, $$list(webengine_successfully_configured))
+ !isEmpty(WEBENGINE_CONFIG): cache(CONFIG, add, $$list($$WEBENGINE_CONFIG))
+ }
+}
+
+# This is called from default_post, at which point we've also parsed
+# command line options
+defineTest(finalizeConfigure) {
+ linux {
+ contains(WEBENGINE_CONFIG, 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}")
+ }
+ contains(WEBENGINE_CONFIG, 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}")
+ }
+ }
+ contains(WEBENGINE_CONFIG, 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 69d3fd3b2..c0e1f90bb 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -14,10 +14,10 @@ defineTest(isPlatformSupported) {
linux-g++*:!isGCCVersionSupported(): return(false)
!isPythonVersionSupported(): return(false)
- linux-g++*|win32-msvc2013|macx-clang*: return(true)
+ linux-g++*|linux-clang|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.")
+ skipBuild("Qt WebEngine can currently only be built for Linux (GCC/clang), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation.")
return(false)
}