diff options
author | Oswald Buddenhagen <[email protected]> | 2016-08-15 14:40:52 +0200 |
---|---|---|
committer | Oswald Buddenhagen <[email protected]> | 2016-08-18 17:09:52 +0000 |
commit | c0cc5052097c723d0331a7619d686af9eb93d33c (patch) | |
tree | ab2fe3240e4542ddb085fd78a9adc453e3a857eb | |
parent | 4b8dd9c846223402d181555f56a0146a2d7b86f8 (diff) |
rewrite library handling in configure
so far, each library was distributed over a test and (optionally) a
'library' output of a feature. this was conceptually messy and limiting.
so instead, turn libraries into a category of their own.
libraries now support multiple properly separated sources, which makes
overriding them a lot saner. sources can be conditional to accommodate
platform differences.
as an immediate consequence, move (almost) all library references from
the config test projects to the json file.
a few tests were excluded, because they are doing somewhat magic things
that should not be handled in this bulk change:
- freetype: .pri file shared with actual source code
- clock-gettime: -lrt is conditional, and there is a .pri file which is
shared with actual source code
- ipc_posix: -lrt & -lpthread conditional
- iconv: -liconv conditional
the multi-source mechanism is used to make a variety of tests work on
windows, where the library name differs from unix (and sometimes between
build configurations). some tests still needed minor adjustments to
actually work.
on the way, fix up disagreements between manually specified libraries
and pkg-config lines (affecting several xcb-related tests).
Change-Id: Ic8c58556fa0cf8f981d386b13ea34b4431b127c5
Reviewed-by: Lars Knoll <[email protected]>
75 files changed, 907 insertions, 886 deletions
diff --git a/config.tests/common/libproxy/libproxy.pro b/config.tests/common/libproxy/libproxy.pro index 51de2021ffe..e3183d99e72 100644 --- a/config.tests/common/libproxy/libproxy.pro +++ b/config.tests/common/libproxy/libproxy.pro @@ -1,4 +1,3 @@ SOURCES = libproxy.cpp CONFIG -= qt dylib mac:CONFIG -= app_bundle -LIBS += -lproxy diff --git a/config.tests/mac/corewlan/corewlan.pro b/config.tests/mac/corewlan/corewlan.pro index 8db0c8c1e7c..97e864f4769 100644 --- a/config.tests/mac/corewlan/corewlan.pro +++ b/config.tests/mac/corewlan/corewlan.pro @@ -1,3 +1,2 @@ OBJECTIVE_SOURCES = corewlantest.mm -LIBS += -framework CoreWLAN -framework Foundation CONFIG -= qt diff --git a/config.tests/qpa/direct2d/direct2d.pro b/config.tests/qpa/direct2d/direct2d.pro index ab62a1da5c3..98527b12a75 100644 --- a/config.tests/qpa/direct2d/direct2d.pro +++ b/config.tests/qpa/direct2d/direct2d.pro @@ -1,4 +1,3 @@ SOURCES = direct2d.cpp -LIBS += -ld2d1 -ldwrite -ld3d11 CONFIG -= qt CONFIG += console diff --git a/config.tests/qpa/egl-x11/egl-x11.pro b/config.tests/qpa/egl-x11/egl-x11.pro index aceb03dd783..fd8479ba354 100644 --- a/config.tests/qpa/egl-x11/egl-x11.pro +++ b/config.tests/qpa/egl-x11/egl-x11.pro @@ -1,12 +1,3 @@ SOURCES = egl-x11.cpp -for(p, QMAKE_LIBDIR_EGL) { - LIBS += -L$$p -} - -!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL -!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL - CONFIG -= qt - -LIBS += -lxcb -lX11 -lX11-xcb diff --git a/config.tests/qpa/egl/egl.pro b/config.tests/qpa/egl/egl.pro index b5396dab155..2c4ae07e647 100644 --- a/config.tests/qpa/egl/egl.pro +++ b/config.tests/qpa/egl/egl.pro @@ -1,10 +1,3 @@ SOURCES = egl.cpp -for(p, QMAKE_LIBDIR_EGL) { - LIBS += -L$$p -} - -!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL -!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL - CONFIG -= qt diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro index d8b1c3ec7e1..d4afa460f7c 100644 --- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro +++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro @@ -1,11 +1,3 @@ SOURCES = eglfs-brcm.cpp CONFIG -= qt - -INCLUDEPATH += $$QMAKE_INCDIR_EGL - -for(p, QMAKE_LIBDIR_EGL) { - LIBS += -L$$p -} - -LIBS += -lEGL -lGLESv2 -lbcm_host diff --git a/config.tests/qpa/eglfs-egldevice/eglfs-egldevice.pro b/config.tests/qpa/eglfs-egldevice/eglfs-egldevice.pro index 0bb8c66cb1a..2f20d993f5b 100644 --- a/config.tests/qpa/eglfs-egldevice/eglfs-egldevice.pro +++ b/config.tests/qpa/eglfs-egldevice/eglfs-egldevice.pro @@ -1,9 +1,3 @@ SOURCES = eglfs-egldevice.cpp -for(p, QMAKE_LIBDIR_EGL) { - LIBS += -L$$p -} - -INCLUDEPATH += $$QMAKE_INCDIR_EGL -LIBS += $$QMAKE_LIBS_EGL CONFIG -= qt diff --git a/config.tests/qpa/eglfs-mali-2/eglfs-mali-2.pro b/config.tests/qpa/eglfs-mali-2/eglfs-mali-2.pro index 85bcf6484a2..de6f85f20f6 100644 --- a/config.tests/qpa/eglfs-mali-2/eglfs-mali-2.pro +++ b/config.tests/qpa/eglfs-mali-2/eglfs-mali-2.pro @@ -1,5 +1,3 @@ SOURCES = eglfs-mali-2.cpp CONFIG -= qt - -LIBS += -lEGL -lGLESv2 diff --git a/config.tests/qpa/eglfs-mali/eglfs-mali.pro b/config.tests/qpa/eglfs-mali/eglfs-mali.pro index 132918c4bc7..80f82828425 100644 --- a/config.tests/qpa/eglfs-mali/eglfs-mali.pro +++ b/config.tests/qpa/eglfs-mali/eglfs-mali.pro @@ -1,5 +1,3 @@ SOURCES = eglfs-mali.cpp CONFIG -= qt - -LIBS += -lEGL -lGLESv2 diff --git a/config.tests/qpa/eglfs-viv/eglfs-viv.pro b/config.tests/qpa/eglfs-viv/eglfs-viv.pro index 1617ee38ad1..2c3dc5cb01a 100644 --- a/config.tests/qpa/eglfs-viv/eglfs-viv.pro +++ b/config.tests/qpa/eglfs-viv/eglfs-viv.pro @@ -5,10 +5,3 @@ integrity { DEFINES += LINUX=1 EGL_API_FB=1 } CONFIG -= qt - -for(p, QMAKE_LIBDIR_OPENGL_EGL) { - exists($$p):LIBS += -L$$p -} - -!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL -!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL diff --git a/config.tests/qpa/gbm/gbm.pro b/config.tests/qpa/gbm/gbm.pro index 19177062a87..1c08eb4e67f 100644 --- a/config.tests/qpa/gbm/gbm.pro +++ b/config.tests/qpa/gbm/gbm.pro @@ -1,4 +1,2 @@ SOURCES = gbm.cpp -CONFIG += link_pkgconfig -PKGCONFIG += gbm CONFIG -= qt diff --git a/config.tests/qpa/kms/kms.pro b/config.tests/qpa/kms/kms.pro index ff6b1f62998..c8239143086 100644 --- a/config.tests/qpa/kms/kms.pro +++ b/config.tests/qpa/kms/kms.pro @@ -1,8 +1,2 @@ SOURCES = kms.cpp -!contains(QT_CONFIG, no-pkg-config) { - CONFIG += link_pkgconfig - PKGCONFIG += libdrm -} else { - LIBS += -ldrm -} CONFIG -= qt diff --git a/config.tests/qpa/mirclient/mirclient.pro b/config.tests/qpa/mirclient/mirclient.pro index b397c2d08a9..3e87194e4e0 100644 --- a/config.tests/qpa/mirclient/mirclient.pro +++ b/config.tests/qpa/mirclient/mirclient.pro @@ -1,4 +1,2 @@ SOURCES = mirclient.cpp -CONFIG += link_pkgconfig -PKGCONFIG += egl mirclient ubuntu-platform-api CONFIG -= qt diff --git a/config.tests/qpa/wayland-server/wayland-server.pro b/config.tests/qpa/wayland-server/wayland-server.pro index c07740d20ff..969bc542bb7 100644 --- a/config.tests/qpa/wayland-server/wayland-server.pro +++ b/config.tests/qpa/wayland-server/wayland-server.pro @@ -1,5 +1,3 @@ SOURCES = wl.cpp CONFIG -= qt -CONFIG += link_pkgconfig -PKGCONFIG += wayland-server diff --git a/config.tests/qpa/xcb-glx/xcb-glx.pro b/config.tests/qpa/xcb-glx/xcb-glx.pro index d7fd1d72083..8086e3a3885 100644 --- a/config.tests/qpa/xcb-glx/xcb-glx.pro +++ b/config.tests/qpa/xcb-glx/xcb-glx.pro @@ -1,5 +1,2 @@ SOURCES = xcb-glx.cpp CONFIG -= qt - -LIBS += -lxcb -lxcb-glx - diff --git a/config.tests/qpa/xcb-render/xcb-render.pro b/config.tests/qpa/xcb-render/xcb-render.pro index 3248b66a67a..7555fa9b61a 100644 --- a/config.tests/qpa/xcb-render/xcb-render.pro +++ b/config.tests/qpa/xcb-render/xcb-render.pro @@ -1,5 +1,2 @@ SOURCES = xcb-render.cpp CONFIG -= qt - -LIBS += -lxcb -lxcb-render -lxcb-render-util - diff --git a/config.tests/qpa/xcb-syslibs/xcb-syslibs.pro b/config.tests/qpa/xcb-syslibs/xcb-syslibs.pro index 23eedb03a77..6363ae90eeb 100644 --- a/config.tests/qpa/xcb-syslibs/xcb-syslibs.pro +++ b/config.tests/qpa/xcb-syslibs/xcb-syslibs.pro @@ -1,5 +1,2 @@ SOURCES = xcb.cpp CONFIG -= qt - -LIBS += -lxcb -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-randr - diff --git a/config.tests/qpa/xcb-xkb/xcb-xkb.pro b/config.tests/qpa/xcb-xkb/xcb-xkb.pro index a684a869d32..804be7b894e 100644 --- a/config.tests/qpa/xcb-xkb/xcb-xkb.pro +++ b/config.tests/qpa/xcb-xkb/xcb-xkb.pro @@ -1,5 +1,2 @@ SOURCES = xcb-xkb.cpp CONFIG -= qt - -LIBS += -lxcb -lxcb-xkb - diff --git a/config.tests/qpa/xcb-xlib/xcb-xlib.pro b/config.tests/qpa/xcb-xlib/xcb-xlib.pro index 03250b44803..0e98a00fd01 100644 --- a/config.tests/qpa/xcb-xlib/xcb-xlib.pro +++ b/config.tests/qpa/xcb-xlib/xcb-xlib.pro @@ -1,5 +1,2 @@ SOURCES = xcb-xlib.cpp CONFIG -= qt - -LIBS += -lxcb -lX11 -lX11-xcb - diff --git a/config.tests/qpa/xcb/xcb.pro b/config.tests/qpa/xcb/xcb.pro index a48fdbd15f2..6363ae90eeb 100644 --- a/config.tests/qpa/xcb/xcb.pro +++ b/config.tests/qpa/xcb/xcb.pro @@ -1,5 +1,2 @@ SOURCES = xcb.cpp CONFIG -= qt - -LIBS += -lxcb - diff --git a/config.tests/unix/alsa/alsa.pro b/config.tests/unix/alsa/alsa.pro index 6d5d55bcfd3..211e9bc8998 100644 --- a/config.tests/unix/alsa/alsa.pro +++ b/config.tests/unix/alsa/alsa.pro @@ -1,3 +1,2 @@ SOURCES = alsatest.cpp -LIBS+=-lasound CONFIG -= qt dylib diff --git a/config.tests/unix/cups/cups.pro b/config.tests/unix/cups/cups.pro index 3f8ca99d0f2..d19ce7d9a68 100644 --- a/config.tests/unix/cups/cups.pro +++ b/config.tests/unix/cups/cups.pro @@ -1,3 +1,2 @@ SOURCES = cups.cpp CONFIG -= qt dylib -LIBS += -lcups diff --git a/config.tests/unix/db2/db2.pro b/config.tests/unix/db2/db2.pro index b7316051f95..ef233fc1842 100644 --- a/config.tests/unix/db2/db2.pro +++ b/config.tests/unix/db2/db2.pro @@ -1,3 +1,2 @@ SOURCES = db2.cpp CONFIG -= qt dylib -LIBS += -ldb2 diff --git a/config.tests/unix/dbus/dbus.pro b/config.tests/unix/dbus/dbus.pro index c2a01ea2693..f9d793b8679 100644 --- a/config.tests/unix/dbus/dbus.pro +++ b/config.tests/unix/dbus/dbus.pro @@ -1,2 +1,8 @@ SOURCES = dbus.cpp CONFIG -= qt + +CONFIG += build_all +CONFIG(debug, debug|release): \ + LIBS += $$LIBS_DEBUG +else: \ + LIBS += $$LIBS_RELEASE diff --git a/config.tests/unix/doubleconversion/doubleconversion.pro b/config.tests/unix/doubleconversion/doubleconversion.pro index ae435b92936..8253d0c2a55 100644 --- a/config.tests/unix/doubleconversion/doubleconversion.pro +++ b/config.tests/unix/doubleconversion/doubleconversion.pro @@ -1,4 +1,3 @@ SOURCES = doubleconversion.cpp CONFIG -= qt CONFIG += console -LIBS += -ldouble-conversion diff --git a/config.tests/unix/fontconfig/fontconfig.pro b/config.tests/unix/fontconfig/fontconfig.pro index 83607740355..82dcfc80a09 100644 --- a/config.tests/unix/fontconfig/fontconfig.pro +++ b/config.tests/unix/fontconfig/fontconfig.pro @@ -1,4 +1,3 @@ SOURCES = fontconfig.cpp CONFIG -= qt -LIBS += -lfreetype -lfontconfig include(../../unix/freetype/freetype.pri) diff --git a/config.tests/unix/freetype/freetype.pro b/config.tests/unix/freetype/freetype.pro index c0cc02d5640..1a9f06909a7 100644 --- a/config.tests/unix/freetype/freetype.pro +++ b/config.tests/unix/freetype/freetype.pro @@ -1,4 +1,3 @@ SOURCES = freetype.cpp CONFIG -= qt -LIBS += -lfreetype include(freetype.pri) diff --git a/config.tests/unix/getaddrinfo/getaddrinfo.pro b/config.tests/unix/getaddrinfo/getaddrinfo.pro index cc739118fa4..18e40971e52 100644 --- a/config.tests/unix/getaddrinfo/getaddrinfo.pro +++ b/config.tests/unix/getaddrinfo/getaddrinfo.pro @@ -1,3 +1,2 @@ SOURCES = getaddrinfotest.cpp CONFIG -= qt dylib -LIBS += $$QMAKE_LIBS_NETWORK diff --git a/config.tests/unix/getifaddrs/getifaddrs.pro b/config.tests/unix/getifaddrs/getifaddrs.pro index 14a89f87b86..db2956a338d 100644 --- a/config.tests/unix/getifaddrs/getifaddrs.pro +++ b/config.tests/unix/getifaddrs/getifaddrs.pro @@ -1,4 +1,3 @@ SOURCES = getifaddrs.cpp CONFIG -= qt QT = -LIBS += $$QMAKE_LIBS_NETWORK diff --git a/config.tests/unix/gnu-libiconv/gnu-libiconv.pro b/config.tests/unix/gnu-libiconv/gnu-libiconv.pro index 1ecf94390a0..4008f882eb3 100644 --- a/config.tests/unix/gnu-libiconv/gnu-libiconv.pro +++ b/config.tests/unix/gnu-libiconv/gnu-libiconv.pro @@ -1,3 +1,2 @@ SOURCES = gnu-libiconv.cpp CONFIG -= qt dylib -LIBS += -liconv diff --git a/config.tests/unix/gstreamer/gstreamer.pro b/config.tests/unix/gstreamer/gstreamer.pro index a5e158fa210..7b6fbb4d756 100644 --- a/config.tests/unix/gstreamer/gstreamer.pro +++ b/config.tests/unix/gstreamer/gstreamer.pro @@ -1,22 +1,4 @@ SOURCES += gstreamer.cpp -CONFIG += link_pkgconfig - -gst-0.10 { - PKGCONFIG_PRIVATE += \ - gstreamer-0.10 \ - gstreamer-base-0.10 \ - gstreamer-audio-0.10 \ - gstreamer-video-0.10 \ - gstreamer-pbutils-0.10 -} else:gst-1.0 { - PKGCONFIG_PRIVATE += \ - gstreamer-1.0 \ - gstreamer-base-1.0 \ - gstreamer-audio-1.0 \ - gstreamer-video-1.0 \ - gstreamer-pbutils-1.0 -} - CONFIG -= qt diff --git a/config.tests/unix/harfbuzz/harfbuzz.pro b/config.tests/unix/harfbuzz/harfbuzz.pro index 32edd6e358b..71a7c355cb5 100644 --- a/config.tests/unix/harfbuzz/harfbuzz.pro +++ b/config.tests/unix/harfbuzz/harfbuzz.pro @@ -1,3 +1,2 @@ SOURCES = harfbuzz.cpp CONFIG -= qt dylib -LIBS += -lharfbuzz diff --git a/config.tests/unix/ibase/ibase.pro b/config.tests/unix/ibase/ibase.pro index 58787851e1f..8c47f66954c 100644 --- a/config.tests/unix/ibase/ibase.pro +++ b/config.tests/unix/ibase/ibase.pro @@ -1,3 +1,2 @@ SOURCES = ibase.cpp CONFIG -= qt dylib -LIBS += -lgds diff --git a/config.tests/unix/icu/icu.pro b/config.tests/unix/icu/icu.pro index f92d7cdfb85..eeed0eaff3e 100644 --- a/config.tests/unix/icu/icu.pro +++ b/config.tests/unix/icu/icu.pro @@ -2,4 +2,8 @@ SOURCES = icu.cpp CONFIG += console CONFIG -= qt dylib -include($$PWD/../../../src/3rdparty/icu_dependency.pri) +CONFIG += build_all +CONFIG(debug, debug|release): \ + LIBS += $$LIBS_DEBUG +else: \ + LIBS += $$LIBS_RELEASE diff --git a/config.tests/unix/iodbc/iodbc.cpp b/config.tests/unix/iodbc/iodbc.cpp deleted file mode 100644 index 3ce12390c2a..00000000000 --- a/config.tests/unix/iodbc/iodbc.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://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.LGPL3 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-3.0.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 (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <sql.h> -#include <sqlext.h> - -int main(int, char **) -{ - return 0; -} diff --git a/config.tests/unix/iodbc/iodbc.pro b/config.tests/unix/iodbc/iodbc.pro deleted file mode 100644 index 68a0bd0ef4b..00000000000 --- a/config.tests/unix/iodbc/iodbc.pro +++ /dev/null @@ -1,3 +0,0 @@ -SOURCES = iodbc.cpp -CONFIG -= qt dylib -LIBS += -liodbc diff --git a/config.tests/unix/ipv6ifname/ipv6ifname.pro b/config.tests/unix/ipv6ifname/ipv6ifname.pro index 88203a782c1..7574dce180c 100644 --- a/config.tests/unix/ipv6ifname/ipv6ifname.pro +++ b/config.tests/unix/ipv6ifname/ipv6ifname.pro @@ -1,4 +1,3 @@ SOURCES = ipv6ifname.cpp CONFIG -= qt QT = -LIBS += $$QMAKE_LIBS_NETWORK diff --git a/config.tests/unix/journald/journald.pro b/config.tests/unix/journald/journald.pro index ea765642e6e..deb28ae97fa 100644 --- a/config.tests/unix/journald/journald.pro +++ b/config.tests/unix/journald/journald.pro @@ -1,10 +1,3 @@ SOURCES = journald.c -CONFIG += link_pkgconfig - -packagesExist(libsystemd): \ - PKGCONFIG_PRIVATE += libsystemd -else: \ - PKGCONFIG_PRIVATE += libsystemd-journal - CONFIG -= qt diff --git a/config.tests/unix/lgmon/lgmon.pro b/config.tests/unix/lgmon/lgmon.pro index 7bd094dc86c..33633b19f8b 100644 --- a/config.tests/unix/lgmon/lgmon.pro +++ b/config.tests/unix/lgmon/lgmon.pro @@ -1,3 +1,2 @@ SOURCES = lgmon.cpp CONFIG -= qt -LIBS += -llgmon diff --git a/config.tests/unix/libdl/libdl.pro b/config.tests/unix/libdl/libdl.pro deleted file mode 100644 index 4016395d35d..00000000000 --- a/config.tests/unix/libdl/libdl.pro +++ /dev/null @@ -1,2 +0,0 @@ -include(../dlopen/dlopen.pro) -LIBS += -ldl diff --git a/config.tests/unix/libinput/libinput.pro b/config.tests/unix/libinput/libinput.pro index 150119c504b..941a0b73ef2 100644 --- a/config.tests/unix/libinput/libinput.pro +++ b/config.tests/unix/libinput/libinput.pro @@ -1,4 +1,2 @@ SOURCES = libinput.cpp CONFIG -= qt -LIBS += $$QMAKE_LIBS_LIBINPUT -INCLUDEPATH += $$QMAKE_INCDIR_LIBINPUT diff --git a/config.tests/unix/libjpeg/libjpeg.pro b/config.tests/unix/libjpeg/libjpeg.pro index 01329a11fef..173249c634d 100644 --- a/config.tests/unix/libjpeg/libjpeg.pro +++ b/config.tests/unix/libjpeg/libjpeg.pro @@ -1,3 +1,2 @@ SOURCES = libjpeg.cpp CONFIG -= qt dylib -LIBS += -ljpeg diff --git a/config.tests/unix/libpng/libpng.pro b/config.tests/unix/libpng/libpng.pro index cdca43171cc..72e5e77b065 100644 --- a/config.tests/unix/libpng/libpng.pro +++ b/config.tests/unix/libpng/libpng.pro @@ -1,8 +1,2 @@ SOURCES = libpng.cpp CONFIG -= qt dylib -!contains(QT_CONFIG, no-pkg-config) { - CONFIG += link_pkgconfig - PKGCONFIG += libpng -} else { - LIBS += -lpng -} diff --git a/config.tests/unix/libudev/libudev.pro b/config.tests/unix/libudev/libudev.pro index 28b8980e2e3..b557e7b17b2 100644 --- a/config.tests/unix/libudev/libudev.pro +++ b/config.tests/unix/libudev/libudev.pro @@ -1,4 +1,2 @@ SOURCES = libudev.cpp CONFIG -= qt -LIBS += $$QMAKE_LIBS_LIBUDEV -INCLUDEPATH += $$QMAKE_INCDIR_LIBUDEV diff --git a/config.tests/unix/mtdev/mtdev.pro b/config.tests/unix/mtdev/mtdev.pro index 4c7f76c89f5..14111c6dc64 100644 --- a/config.tests/unix/mtdev/mtdev.pro +++ b/config.tests/unix/mtdev/mtdev.pro @@ -1,6 +1,3 @@ SOURCES = mtdev.cpp -CONFIG += link_pkgconfig -PKGCONFIG_PRIVATE += mtdev - CONFIG -= qt diff --git a/config.tests/unix/mysql/mysql.cpp b/config.tests/unix/mysql/mysql.cpp index 697148cbcbb..3f83cb1e686 100644 --- a/config.tests/unix/mysql/mysql.cpp +++ b/config.tests/unix/mysql/mysql.cpp @@ -36,6 +36,9 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__) +#include <windows.h> +#endif #include "mysql.h" diff --git a/config.tests/unix/mysql/mysql.pro b/config.tests/unix/mysql/mysql.pro index 06d1880f082..745f9ee0fb3 100644 --- a/config.tests/unix/mysql/mysql.pro +++ b/config.tests/unix/mysql/mysql.pro @@ -1,3 +1,2 @@ SOURCES = mysql.cpp CONFIG -= qt dylib -LIBS += -lmysqlclient diff --git a/config.tests/unix/mysql_r/mysql_r.pro b/config.tests/unix/mysql_r/mysql_r.pro deleted file mode 100644 index 096da69487a..00000000000 --- a/config.tests/unix/mysql_r/mysql_r.pro +++ /dev/null @@ -1,3 +0,0 @@ -SOURCES = ../mysql/mysql.cpp -CONFIG -= qt dylib -LIBS += -lmysqlclient_r diff --git a/config.tests/unix/oci/oci.pro b/config.tests/unix/oci/oci.pro index 3ffda1ddd7e..c9aec08ee0b 100644 --- a/config.tests/unix/oci/oci.pro +++ b/config.tests/unix/oci/oci.pro @@ -1,3 +1,2 @@ SOURCES = oci.cpp CONFIG -= qt dylib -LIBS += -lclntsh diff --git a/config.tests/unix/odbc/odbc.cpp b/config.tests/unix/odbc/odbc.cpp index f4a52f9dac1..fc36f121c48 100644 --- a/config.tests/unix/odbc/odbc.cpp +++ b/config.tests/unix/odbc/odbc.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#ifdef __MINGW32__ +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__) #include <windows.h> #endif #include <sql.h> @@ -45,5 +45,7 @@ int main(int, char **) { + SQLHANDLE env; + SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env); return 0; } diff --git a/config.tests/unix/odbc/odbc.pro b/config.tests/unix/odbc/odbc.pro index 70f3b668dab..6c72dc7b1ce 100644 --- a/config.tests/unix/odbc/odbc.pro +++ b/config.tests/unix/odbc/odbc.pro @@ -1,4 +1,2 @@ SOURCES = odbc.cpp CONFIG -= qt dylib -mingw:LIBS += -lodbc32 -else:LIBS += -lodbc diff --git a/config.tests/unix/opengldesktop/opengldesktop.pro b/config.tests/unix/opengldesktop/opengldesktop.pro index c3e700c50aa..22c0be247d9 100644 --- a/config.tests/unix/opengldesktop/opengldesktop.pro +++ b/config.tests/unix/opengldesktop/opengldesktop.pro @@ -1,11 +1,5 @@ SOURCES = opengldesktop.cpp -INCLUDEPATH += $$QMAKE_INCDIR_OPENGL - -for(p, QMAKE_LIBDIR_OPENGL) { - exists($$p):LIBS += -L$$p -} CONFIG -= qt -LIBS += $$QMAKE_LIBS_OPENGL mac:DEFINES += Q_OS_MAC diff --git a/config.tests/unix/opengles2/opengles2.pro b/config.tests/unix/opengles2/opengles2.pro index da30b453c65..c84563f62ea 100644 --- a/config.tests/unix/opengles2/opengles2.pro +++ b/config.tests/unix/opengles2/opengles2.pro @@ -1,12 +1,7 @@ SOURCES = opengles2.cpp -INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2 - -for(p, QMAKE_LIBDIR_OPENGL_ES2) { - LIBS += -L$$p -} CONFIG -= qt -LIBS += $$QMAKE_LIBS_OPENGL_ES2 + mac { DEFINES += BUILD_ON_MAC } diff --git a/config.tests/unix/opengles3/opengles3.pro b/config.tests/unix/opengles3/opengles3.pro index 720985f14db..956a3bc1027 100644 --- a/config.tests/unix/opengles3/opengles3.pro +++ b/config.tests/unix/opengles3/opengles3.pro @@ -3,14 +3,9 @@ # the library. SOURCES = opengles3.cpp -INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2 - -for(p, QMAKE_LIBDIR_OPENGL_ES2) { - LIBS += -L$$p -} CONFIG -= qt -LIBS += $$QMAKE_LIBS_OPENGL_ES2 + mac { DEFINES += BUILD_ON_MAC } diff --git a/config.tests/unix/opengles31/opengles31.pro b/config.tests/unix/opengles31/opengles31.pro index 225180e1c69..7895be9efc2 100644 --- a/config.tests/unix/opengles31/opengles31.pro +++ b/config.tests/unix/opengles31/opengles31.pro @@ -3,11 +3,5 @@ # the library. SOURCES = opengles31.cpp -INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2 - -for(p, QMAKE_LIBDIR_OPENGL_ES2) { - LIBS += -L$$p -} CONFIG -= qt -LIBS += $$QMAKE_LIBS_OPENGL_ES2 diff --git a/config.tests/unix/pcre/pcre.pro b/config.tests/unix/pcre/pcre.pro index 7b8bfc65453..a47e6d1e967 100644 --- a/config.tests/unix/pcre/pcre.pro +++ b/config.tests/unix/pcre/pcre.pro @@ -1,3 +1,2 @@ SOURCES = pcre.cpp CONFIG -= qt dylib -LIBS += -lpcre16 diff --git a/config.tests/unix/pps/pps.pro b/config.tests/unix/pps/pps.pro index 21bdeedbfbc..af9b339f97d 100644 --- a/config.tests/unix/pps/pps.pro +++ b/config.tests/unix/pps/pps.pro @@ -1,3 +1,2 @@ SOURCES = pps.cpp CONFIG -= qt -LIBS += -lpps diff --git a/config.tests/unix/psql/psql.pro b/config.tests/unix/psql/psql.pro index d0f3761bfb1..dae7375be56 100644 --- a/config.tests/unix/psql/psql.pro +++ b/config.tests/unix/psql/psql.pro @@ -1,3 +1,2 @@ SOURCES = psql.cpp CONFIG -= qt dylib -LIBS *= -lpq diff --git a/config.tests/unix/pulseaudio/pulseaudio.pro b/config.tests/unix/pulseaudio/pulseaudio.pro index d75b16f41ef..5e36c0aa81c 100644 --- a/config.tests/unix/pulseaudio/pulseaudio.pro +++ b/config.tests/unix/pulseaudio/pulseaudio.pro @@ -1,3 +1,2 @@ SOURCES = pulseaudio.cpp CONFIG -= qt -LIBS += diff --git a/config.tests/unix/qqnx_imf/qqnx_imf.pro b/config.tests/unix/qqnx_imf/qqnx_imf.pro index c51adb65ad4..e1a2d9cecb3 100644 --- a/config.tests/unix/qqnx_imf/qqnx_imf.pro +++ b/config.tests/unix/qqnx_imf/qqnx_imf.pro @@ -1,3 +1,2 @@ SOURCES = qqnx_imf.cpp CONFIG -= qt -LIBS += -linput_client diff --git a/config.tests/unix/sctp/sctp.pro b/config.tests/unix/sctp/sctp.pro index edcc0a444a8..2138254732c 100644 --- a/config.tests/unix/sctp/sctp.pro +++ b/config.tests/unix/sctp/sctp.pro @@ -1,4 +1,3 @@ SOURCES = sctp.cpp CONFIG -= qt QT = -LIBS += $$QMAKE_LIBS_NETWORK diff --git a/config.tests/unix/slog2/slog2.pro b/config.tests/unix/slog2/slog2.pro index e65460bb948..269a88a3831 100644 --- a/config.tests/unix/slog2/slog2.pro +++ b/config.tests/unix/slog2/slog2.pro @@ -1,3 +1,2 @@ SOURCES = slog2.cpp CONFIG -= qt -LIBS += -lslog2 diff --git a/config.tests/unix/sqlite2/sqlite2.pro b/config.tests/unix/sqlite2/sqlite2.pro index 7e69fdf2f32..b1252721dc0 100644 --- a/config.tests/unix/sqlite2/sqlite2.pro +++ b/config.tests/unix/sqlite2/sqlite2.pro @@ -1,3 +1,2 @@ SOURCES = sqlite2.cpp CONFIG -= qt dylib -LIBS += -lsqlite diff --git a/config.tests/unix/tds/tds.pro b/config.tests/unix/tds/tds.pro index 6712779d589..f60fc0a6022 100644 --- a/config.tests/unix/tds/tds.pro +++ b/config.tests/unix/tds/tds.pro @@ -1,3 +1,2 @@ SOURCES = tds.cpp CONFIG -= qt dylib -LIBS += -lsybdb diff --git a/config.tests/unix/tslib/tslib.pro b/config.tests/unix/tslib/tslib.pro index 1191120b890..6fc652dd96a 100644 --- a/config.tests/unix/tslib/tslib.pro +++ b/config.tests/unix/tslib/tslib.pro @@ -1,3 +1,2 @@ SOURCES = tslib.cpp CONFIG -= qt -LIBS += -lts diff --git a/config.tests/unix/zlib/zlib.pro b/config.tests/unix/zlib/zlib.pro index d9bd03e5df3..6a6b3246112 100644 --- a/config.tests/unix/zlib/zlib.pro +++ b/config.tests/unix/zlib/zlib.pro @@ -1,3 +1,2 @@ SOURCES = zlib.cpp CONFIG -= qt dylib -LIBS += -lz diff --git a/config.tests/win/directwrite/directwrite.pro b/config.tests/win/directwrite/directwrite.pro index 9a4612ca119..88ff6ee2b86 100644 --- a/config.tests/win/directwrite/directwrite.pro +++ b/config.tests/win/directwrite/directwrite.pro @@ -1,4 +1,3 @@ SOURCES = directwrite.cpp -LIBS += -ldwrite CONFIG -= qt CONFIG += console diff --git a/config.tests/win/directwrite2/directwrite2.pro b/config.tests/win/directwrite2/directwrite2.pro index ec37247017a..5d6fe24a4b6 100644 --- a/config.tests/win/directwrite2/directwrite2.pro +++ b/config.tests/win/directwrite2/directwrite2.pro @@ -1,4 +1,3 @@ SOURCES = directwrite2.cpp -LIBS += -ldwrite CONFIG -= qt CONFIG += console diff --git a/config.tests/x11/opengl/opengl.cpp b/config.tests/x11/opengl/opengl.cpp deleted file mode 100644 index e73c46b9e6e..00000000000 --- a/config.tests/x11/opengl/opengl.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the config.tests 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 https://www.qt.io/terms-conditions. For further -** information use the contact form at https://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.LGPL3 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-3.0.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 (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <GL/gl.h> - -int main(int, char **) -{ - GLuint x; - x = 0; - return 0; -} diff --git a/config.tests/x11/opengl/opengl.pro b/config.tests/x11/opengl/opengl.pro deleted file mode 100644 index d6814f1bd56..00000000000 --- a/config.tests/x11/opengl/opengl.pro +++ /dev/null @@ -1,11 +0,0 @@ -SOURCES = opengl.cpp -CONFIG += x11 -INCLUDEPATH += $$QMAKE_INCDIR_OPENGL - -for(p, QMAKE_LIBDIR_OPENGL) { - exists($$p):LIBS += -L$$p -} - -CONFIG -= qt -mingw:LIBS += -lopengl32 -else:LIBS += -lGL diff --git a/config.tests/x11/xinput2/xinput2.pro b/config.tests/x11/xinput2/xinput2.pro index ae8819b3d1f..4788f0e14b8 100644 --- a/config.tests/x11/xinput2/xinput2.pro +++ b/config.tests/x11/xinput2/xinput2.pro @@ -1,4 +1,3 @@ CONFIG += x11 CONFIG -= qt -LIBS += -lXi SOURCES = xinput2.cpp diff --git a/config.tests/x11/xrender/xrender.pro b/config.tests/x11/xrender/xrender.pro index e7786420fa0..ab5c5efa773 100644 --- a/config.tests/x11/xrender/xrender.pro +++ b/config.tests/x11/xrender/xrender.pro @@ -1,4 +1,3 @@ SOURCES = xrender.cpp CONFIG += x11 CONFIG -= qt -LIBS += -lXrender diff --git a/configure.json b/configure.json index df4180636f4..56fda6200cb 100644 --- a/configure.json +++ b/configure.json @@ -201,6 +201,547 @@ }, + "libraries": { + "libatomic": { + "description": "64 bit atomics in libatomic", + "export": "", + "test": "common/atomic64", + "sources": [ + "-latomic" + ] + }, + "libdl": { + "description": "dlopen() in libdl", + "export": "", + "test": "unix/dlopen", + "sources": [ + "-ldl" + ] + }, + "doubleconversion": { + "description": "DoubleConversion", + "export": "", + "test": "unix/doubleconversion", + "sources": [ + "-ldouble-conversion" + ] + }, + "pcre": { + "description": "PCRE", + "export": "", + "test": "unix/pcre", + "sources": [ + "-lpcre16" + ] + }, + "zlib": { + "description": "zlib", + "test": "unix/zlib", + "export": "", + "sources": [ + { "libs": "-lzdll", "condition": "config.msvc" }, + { "libs": "-lz", "condition": "!config.msvc" } + ] + }, + "gnu_iconv": { + "description": "GNU libiconv", + "export": "", + "test": "unix/gnu-libiconv", + "sources": [ + "-liconv" + ] + }, + "icu": { + "description": "ICU", + "export": "", + "test": "unix/icu", + "sources": [ + { + "builds": { + "debug": "-lsicuind -lsicuucd -lsicudtd", + "release": "-lsicuin -lsicuuc -lsicudt" + }, + "condition": "config.win32 && !features.shared" + }, + { "libs": "-licuin -licuuc -licudt", "condition": "config.win32 && features.shared" }, + { "libs": "-licui18n -licuuc -licudata", "condition": "!config.win32" } + ] + }, + "network": { + "export": "", + "sources": [ + { "type": "makeSpec", "spec": "NETWORK" } + ] + }, + "corewlan": { + "description": "CoreWLan", + "export": "", + "test": "mac/corewlan", + "sources": [ + "-framework CoreWLAN -framework Foundation" + ] + }, + "openssl": { + "description": "OpenSSL Libraries", + "export": "", + "sources": [ + { "type": "openssl" }, + { "libs": "-lssleay32 -llibeay32", "condition": "config.win32 && features.shared" }, + { "libs": "-lssl -lcrypto", "condition": "!config.win32" } + ] + }, + "libproxy": { + "description": "libproxy", + "export": "", + "test": "common/libproxy", + "sources": [ + "-lproxy" + ] + }, + "glib": { + "description": "GLib", + "test": "unix/glib", + "sources": [ + { "type": "pkgConfig", "args": "glib-2.0 gthread-2.0" } + ] + }, + "gtk3": { + "description": "GTK+", + "sources": [ + { "type": "pkgConfig", "args": "gtk+-3.0" } + ] + }, + "cups": { + "description": "CUPS", + "export": "", + "test": "unix/cups", + "sources": [ + "-lcups" + ] + }, + "libjpeg": { + "description": "libjpeg", + "export": "", + "test": "unix/libjpeg", + "sources": [ + { "libs": "-llibjpeg", "condition": "config.msvc" }, + { "libs": "-ljpeg", "condition": "!config.msvc" } + ] + }, + "libpng": { + "description": "libpng", + "export": "", + "test": "unix/libpng", + "sources": [ + { "type": "pkgConfig", "args": "libpng" }, + { "libs": "-llibpng", "condition": "config.msvc" }, + { "libs": "-lpng", "condition": "!config.msvc" } + ] + }, + "alsa": { + "description": "ALSA", + "export": "", + "test": "unix/alsa", + "sources": [ + "-lasound" + ] + }, + "pulseaudio": { + "description": "PulseAudio >= 0.9.10", + "test": "unix/pulseaudio", + "sources": [ + { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" } + ] + }, + "gstreamer_1_0": { + "description": "GStreamer 1.0", + "export": "", + "test": "unix/gstreamer", + "sources": [ + { "type": "pkgConfig", + "args": "gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0" } + ] + }, + "gstreamer_0_10": { + "description": "GStreamer 0.10", + "export": "", + "test": "unix/gstreamer", + "sources": [ + { "type": "pkgConfig", + "args": "gstreamer-0.10 gstreamer-base-0.10 gstreamer-audio-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10" } + ] + }, + "freetype": { + "description": "FreeType", + "export": "", + "test": "unix/freetype", + "sources": [ + "-lfreetype" + ] + }, + "fontconfig": { + "description": "Fontconfig", + "test": "unix/fontconfig", + "sources": [ + { "type": "pkgConfig", "args": "fontconfig freetype2" }, + "-lfontconfig -lfreetype" + ] + }, + "harfbuzz": { + "description": "HarfBuzz", + "export": "", + "test": "unix/harfbuzz", + "sources": [ + "-lharfbuzz" + ] + }, + "dbus": { + "description": "D-Bus >= 1.2", + "test": "unix/dbus", + "sources": [ + { "type": "pkgConfig", "args": "dbus-1 >= 1.2" }, + { + "libs": "", + "builds": { + "debug": "-ldbus-1d", + "release": "-ldbus-1" + }, + "condition": "config.win32" + }, + { "libs": "-ldbus-1", "condition": "!config.win32" } + ] + }, + "host_dbus": { + "description": "D-Bus >= 1.2 (host)", + "export": "", + "sources": [ + { "type": "pkgConfig", "host": true, "args": "dbus-1 >= 1.2" } + ] + }, + "libinput": { + "description": "libinput", + "test": "unix/libinput", + "sources": [ + { "type": "pkgConfig", "args": "libinput" } + ] + }, + "mtdev": { + "description": "mtdev", + "export": "", + "test": "unix/mtdev", + "sources": [ + { "type": "pkgConfig", "args": "mtdev" } + ] + }, + "tslib": { + "description": "tslib", + "export": "", + "test": "unix/tslib", + "sources": [ + "-lts" + ] + }, + "libudev": { + "description": "udev", + "test": "unix/libudev", + "sources": [ + { "type": "pkgConfig", "args": "libudev" }, + "-ludev" + ] + }, + "xkbcommon": { + "description": "xkbcommon", + "export": "xkbcommon_evdev", + "test": "unix/xkbcommon", + "sources": [ + { "type": "pkgConfig", "args": "xkbcommon" } + ] + }, + "xkbcommon_x11": { + "description": "xkbcommon-x11 >= 0.4.1", + "export": "xkbcommon", + "sources": [ + { "type": "pkgConfig", "args": "xkbcommon xkbcommon-x11 >= 0.4.1" } + ] + }, + "xinput2": { + "description": "Xinput2", + "test": "x11/xinput2", + "sources": [ + { "type": "pkgConfig", "args": "xi" }, + "-lXi" + ] + }, + "xrender": { + "description": "XRender", + "export": "", + "test": "x11/xrender", + "sources": [ + "-lXrender" + ] + }, + "xcb": { + "description": "XCB >= 1.5 (core)", + "test": "qpa/xcb", + "sources": [ + { "type": "pkgConfig", "args": "xcb >= 1.5" }, + "-lxcb" + ] + }, + "xcb_syslibs": { + "description": "XCB (secondary)", + "export": "", + "test": "qpa/xcb-syslibs", + "sources": [ + { "type": "pkgConfig", + "args": "xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm xcb-shape" }, + "-lxcb -lxcb-shm -lxcb-sync -lxcb-xfixes -lxcb-randr -lxcb-image -lxcb-keysyms -lxcb-icccm -lxcb-shape" + ] + }, + "xcb_xlib": { + "description": "XCB Xlib", + "export": "", + "test": "qpa/xcb-xlib", + "sources": [ + { "type": "pkgConfig", "args": "X11-xcb x11 xcb" }, + "-lxcb -lX11 -lX11-xcb" + ] + }, + "xcb_xkb": { + "description": "XCB XKB >= 1.10", + "export": "", + "test": "qpa/xcb-xkb", + "sources": [ + { "type": "pkgConfig", "args": "xcb-xkb >= 1.10 xcb" }, + "-lxcb-xkb -lxcb" + ] + }, + "xcb_render": { + "description": "XCB XRender", + "test": "qpa/xcb-render", + "sources": [ + { "type": "pkgConfig", "args": "xcb-renderutil xcb-render xcb" }, + "-lxcb-render-util -lxcb-render -lxcb" + ] + }, + "xcb_glx": { + "description": "XCB GLX", + "test": "qpa/xcb-glx", + "sources": [ + { "type": "pkgConfig", "args": "xcb-glx xcb" }, + "-lxcb-glx -lxcb" + ] + }, + "x11sm": { + "description": "X11 session management", + "export": "", + "sources": [ + { "type": "pkgConfig", "args": "sm ice" } + ] + }, + "opengl": { + "description": "Desktop OpenGL", + "test": "unix/opengldesktop", + "sources": [ + { "type": "pkgConfig", "args": "gl" }, + { "type": "makeSpec", "spec": "OPENGL" } + ] + }, + "opengl_es2": { + "description": "OpenGL ES 2.0", + "test": "unix/opengles2", + "sources": [ + { "type": "pkgConfig", "args": "glesv2" }, + { "type": "makeSpec", "spec": "OPENGL_ES2" } + ] + }, + "egl": { + "description": "EGL", + "test": "qpa/egl", + "sources": [ + { "type": "pkgConfig", "args": "egl" }, + { "type": "makeSpec", "spec": "EGL" } + ] + }, + "bcm_host": { + "export": "", + "sources": [ + "-lbcm_host" + ] + }, + "gbm": { + "description": "GBM", + "export": "", + "test": "qpa/gbm", + "sources": [ + { "type": "pkgConfig", "args": "gbm" } + ] + }, + "drm": { + "description": "KMS", + "export": "", + "test": "qpa/kms", + "sources": [ + { "type": "pkgConfig", "args": "libdrm" }, + "-ldrm" + ] + }, + "wayland_server": { + "description": "Wayland Server", + "export": "", + "test": "qpa/wayland-server", + "sources": [ + { "type": "pkgConfig", "args": "wayland-server" } + ] + }, + "directfb": { + "description": "DirectFB", + "test": "qpa/directfb", + "sources": [ + { "type": "pkgConfig", "args": "directfb" } + ] + }, + "mirclient": { + "description": "Mir client libraries", + "export": "", + "test": "qpa/mirclient", + "sources": [ + { "type": "pkgConfig", "args": "egl mirclient ubuntu-platform-api" } + ] + }, + "directwrite": { + "description": "DirectWrite", + "export": "", + "test": "win/directwrite", + "sources": [ + "-ldwrite" + ] + }, + "journald": { + "description": "journald", + "test": "unix/journald", + "export": "", + "sources": [ + { "type": "pkgConfig", "args": "libsystemd" }, + { "type": "pkgConfig", "args": "libsystemd-journal" } + ] + }, + "slog2": { + "description": "slog2", + "test": "unix/slog2", + "export": "", + "sources": [ + "-lslog2" + ] + }, + "imf": { + "description": "IMF", + "export": "", + "test": "unix/qqnx_imf", + "sources": [ + "-linput_client" + ] + }, + "pps": { + "description": "PPS", + "export": "", + "test": "unix/pps", + "sources": [ + "-lpps" + ] + }, + "lgmon": { + "description": "lgmon", + "test": "unix/lgmon", + "export": "", + "sources": [ + "-llgmon" + ] + }, + "db2": { + "description": "DB2 (IBM)", + "export": "", + "test": "unix/db2", + "sources": [ + { "libs": "-ldb2cli", "condition": "config.win32" }, + { "libs": "-ldb2", "condition": "!config.win32" } + ] + }, + "ibase": { + "description": "InterBase", + "export": "", + "test": "unix/ibase", + "sources": [ + { "libs": "-lgds32_ms", "condition": "config.win32" }, + { "libs": "-lgds", "condition": "!config.win32" } + ] + }, + "mysql": { + "description": "MySQL", + "test": "unix/mysql", + "sources": [ + { "type": "mysqlConfig", "query": "--libs_r" }, + { "type": "mysqlConfig", "query": "--libs" }, + { "libs": "-lmysqlclient_r", "condition": "!config.win32" }, + { "libs": "-llibmysql", "condition": "config.win32" }, + { "libs": "-lmysqlclient", "condition": "!config.win32" } + ] + }, + "psql": { + "description": "PostgreSQL", + "test": "unix/psql", + "sources": [ + { "type": "psqlConfig" }, + { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" }, + { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" } + ] + }, + "tds": { + "description": "TDS (Sybase)", + "test": "unix/tds", + "sources": [ + { "type": "sybaseEnv", "libs": "-lNTWDBLIB", "condition": "config.win32" }, + { "type": "sybaseEnv", "libs": "-lsybdb", "condition": "!config.win32" } + ] + }, + "oci": { + "description": "OCI (Oracle)", + "export": "", + "test": "unix/oci", + "sources": [ + { "libs": "-loci", "condition": "config.win32" }, + { "libs": "-lclntsh", "condition": "!config.win32" } + ] + }, + "odbc": { + "description": "ODBC", + "test": "unix/odbc", + "sources": [ + { "libs": "-lodbc32", "condition": "config.win32" }, + { "libs": "-liodbc", "condition": "config.darwin" }, + { "libs": "-lodbc", "condition": "!config.win32 && !config.darwin" } + ] + }, + "sqlite2": { + "description": "SQLite (version 2)", + "export": "", + "test": "unix/sqlite2", + "sources": [ + "-lsqlite" + ] + }, + "sqlite3": { + "description": "SQLite (version 3)", + "export": "sqlite", + "test": "unix/sqlite", + "sources": [ + { "type": "pkgConfig", "args": "sqlite3" }, + { "libs": "-lsqlite3", "condition": "config.win32" }, + { "libs": "-lsqlite3 -lz", "condition": "!config.win32" } + ] + } + }, + "tests": { "architecture": { "description": "target architecture", @@ -289,11 +830,6 @@ "type": "compile", "test": "unix/dlopen" }, - "libdl": { - "description": "dlopen() in libdl", - "type": "compile", - "test": "unix/libdl" - }, "separate_debug_info": { "description": "separate debug information support", "type": "compile", @@ -304,12 +840,6 @@ "type": "compile", "test": "common/atomic64" }, - "atomic64_libatomic": { - "description": "64 bit atomics in libatomic", - "type": "compile", - "test": "common/atomic64", - "libs": "-latomic" - }, "atomicfptr": { "description": "working std::atomic for function pointers", "type": "compile", @@ -433,11 +963,6 @@ "type": "compile", "test": "unix/clock-monotonic" }, - "alsa": { - "description": "ALSA", - "type": "compile", - "test": "unix/alsa" - }, "evdev": { "description": "evdev", "type": "compile", @@ -448,20 +973,17 @@ "type": "compile", "test": "unix/eventfd" }, - "gbm": { - "description": "GBM", - "type": "compile", - "test": "qpa/gbm" - }, "getaddrinfo": { "description": "getaddrinfo()", "type": "compile", - "test": "unix/getaddrinfo" + "test": "unix/getaddrinfo", + "use": "network" }, "getifaddrs": { "description": "getifaddrs()", "type": "compile", - "test": "unix/getifaddrs" + "test": "unix/getifaddrs", + "use": "network" }, "inotify": { "description": "inotify", @@ -471,38 +993,19 @@ "ipv6ifname": { "description": "IPv6 ifname", "type": "compile", - "test": "unix/ipv6ifname" - }, - "libproxy": { - "description": "libproxy", - "type": "compile", - "test": "common/libproxy" + "test": "unix/ipv6ifname", + "use": "network" }, "linuxfb": { "description": "LinuxFB", "type": "compile", "test": "qpa/linuxfb" }, - "kms": { - "description": "KMS", - "type": "compile", - "test": "qpa/kms" - }, - "mirclient": { - "description": "Mir client libraries", - "type": "compile", - "test": "qpa/mirclient" - }, "mremap": { "description": "mremap()", "type": "compile", "test": "unix/mremap" }, - "mtdev": { - "description": "mtdev", - "type": "compile", - "test": "unix/mtdev" - }, "journald": { "description": "journald", "type": "compile", @@ -523,26 +1026,6 @@ "type": "compilerSupportsFlag", "test": "-fstack-protector-strong" }, - "slog2": { - "description": "slog2", - "type": "compile", - "test": "unix/slog2" - }, - "imf": { - "description": "IMF", - "type": "compile", - "test": "unix/qqnx_imf" - }, - "pps": { - "description": "PPS", - "type": "compile", - "test": "unix/pps" - }, - "lgmon": { - "description": "lgmon", - "type": "compile", - "test": "unix/lgmon" - }, "ipc_sysv": { "description": "SysV IPC", "type": "compile", @@ -553,11 +1036,6 @@ "type": "compile", "test": "unix/ipc_posix" }, - "tslib": { - "description": "tslib", - "type": "compile", - "test": "unix/tslib" - }, "ppoll": { "description": "ppoll()", "type": "compile", @@ -578,67 +1056,16 @@ "type": "compile", "test": "unix/cloexec" }, - "corewlan": { - "description": "CoreWLan", - "type": "compile", - "test": "mac/corewlan" - }, "openssl": { "description": "OpenSSL", "type": "compile", "test": "unix/openssl" }, - "openssl-libs": { - "description": "OpenSSL Libraries", - "type": "openssl", - "libs": "-lssl -lcrypto" - }, "sctp": { "description": "SCTP support", "type": "compile", - "test": "unix/sctp" - }, - "icu": { - "description": "ICU", - "type": "compile", - "test": "unix/icu" - }, - "glib": { - "description": "GLib", - "type": "compile", - "test": "unix/glib", - "pkg-config-args": "glib-2.0 gthread-2.0" - }, - "gtk": { - "description": "GTK+", - "type": "pkgConfig", - "pkg-config-args": "gtk+-3.0" - }, - "pulseaudio": { - "description": "PulseAudio >= 0.9.10", - "type": "compile", - "test": "unix/pulseaudio", - "pkg-config-args": "libpulse >= 0.9.10 libpulse-mainloop-glib" - }, - "cups": { - "description": "CUPS", - "type": "compile", - "test": "unix/cups" - }, - "libjpeg": { - "description": "libjpeg", - "type": "compile", - "test": "unix/libjpeg" - }, - "libpng": { - "description": "libpng", - "type": "compile", - "test": "unix/libpng" - }, - "zlib": { - "description": "zlib", - "type": "compile", - "test": "unix/zlib" + "test": "unix/sctp", + "use": "network" }, "posix-iconv": { "description": "POSIX iconv", @@ -650,196 +1077,52 @@ "type": "compile", "test": "unix/sun-libiconv" }, - "gnu-iconv": { - "description": "GNU libiconv", - "type": "compile", - "test": "unix/gnu-libiconv" - }, - "freetype": { - "description": "FreeType", - "type": "compile", - "test": "unix/freetype" - }, - "fontconfig": { - "description": "Fontconfig", - "type": "compile", - "test": "unix/fontconfig", - "pkg-config-args": "fontconfig freetype2", - "libs": "-lfontconfig -lfreetype" - }, - "harfbuzz": { - "description": "HarfBuzz", - "type": "compile", - "test": "unix/harfbuzz" - }, - "dbus": { - "description": "D-Bus >= 1.2", - "type": "compile", - "test": "unix/dbus", - "pkg-config-args": "dbus-1 >= 1.2" - }, - "host-dbus": { - "description": "D-Bus >= 1.2 (host)", - "type": "pkgConfig", - "host": true, - "pkg-config-args": "dbus-1 >= 1.2" - }, - "directfb": { - "description": "DirectFB", - "type": "compile", - "test": "qpa/directfb", - "pkg-config-args": "directfb" - }, - "egl": { - "description": "EGL", - "type": "compile", - "test": "qpa/egl", - "pkg-config-args": "egl" - }, "egl-x11": { "description": "EGL on X11", "type": "compile", "test": "qpa/egl-x11", - "pkg-config-args": "egl" + "use": "egl xcb_xlib" }, "egl-brcm": { "description": "Broadcom EGL (Rasberry Pi)", "type": "compile", "test": "qpa/eglfs-brcm", - "pkg-config-args": "egl" + "use": "egl bcm_host" }, "egl-egldevice": { "description": "EGLDevice", "type": "compile", - "test": "qpa/eglfs-egldevice" + "test": "qpa/eglfs-egldevice", + "use": "egl" }, "egl-mali": { "description": "Mali EGL", "type": "compile", - "test": "qpa/eglfs-mali" + "test": "qpa/eglfs-mali", + "use": "egl" }, "egl-mali-2": { "description": "Mali 2 EGL", "type": "compile", - "test": "qpa/eglfs-mali-2" + "test": "qpa/eglfs-mali-2", + "use": "egl" }, "egl-viv": { "description": "i.Mx6 EGL", "type": "compile", - "test": "qpa/eglfs-viv" - }, - "wayland-server": { - "description": "Wayland Server", - "type": "compile", - "test": "qpa/wayland-server" - }, - "libinput": { - "description": "libinput", - "type": "compile", - "test": "unix/libinput", - "pkg-config-args": "libinput" - }, - "libudev": { - "description": "udev", - "type": "compile", - "test": "unix/libudev", - "pkg-config-args": "libudev" - }, - "xkbcommon": { - "description": "xkbcommon", - "type": "compile", - "test": "unix/xkbcommon", - "pkg-config-args": "xkbcommon" - }, - "xkbcommon-x11": { - "description": "xkbcommon-x11 >= 0.4.1", - "type": "pkgConfig", - "pkg-config-args": "xkbcommon xkbcommon-x11 >= 0.4.1" - }, - "xinput2": { - "description": "Xinput2", - "type": "compile", - "test": "x11/xinput2", - "pkg-config-args": "xi" - }, - "doubleconversion": { - "description": "DoubleConversion", - "type": "compile", - "test": "unix/doubleconversion" + "test": "qpa/eglfs-viv", + "use": "egl" }, "xlocalescanprint": { "description": "xlocale.h (or equivalents)", "type": "compile", "test": "common/xlocalescanprint" }, - "pcre": { - "description": "PCRE", - "type": "compile", - "test": "unix/pcre" - }, - "gstreamer-1_0": { - "description": "GStreamer 1.0", - "type": "compile", - "test": "unix/gstreamer", - "args": "-config gst-1.0" - }, - "gstreamer-0_10": { - "description": "GStreamer 0.10", - "type": "compile", - "test": "unix/gstreamer", - "args": "-config gst-0.10" - }, - "xcb": { - "description": "XCB >= 1.5 (core)", - "type": "compile", - "test": "qpa/xcb", - "pkg-config-args": "xcb >= 1.5" - }, - "xcb-syslibs": { - "description": "XCB (secondary)", - "type": "compile", - "test": "qpa/xcb-syslibs", - "pkg-config-args": "xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm xcb-shape" - }, - "xcb-xkb": { - "description": "XCB XKB >= 1.10", - "type": "compile", - "test": "qpa/xcb-xkb", - "pkg-config-args": "xcb-xkb >= 1.10" - }, - "xcb-render": { - "description": "XCB XRender", - "type": "compile", - "test": "qpa/xcb-render", - "pkg-config-args": "xcb" - }, - "xcb-glx": { - "description": "XCB GLX", - "type": "compile", - "test": "qpa/xcb-glx", - "pkg-config-args": "xcb" - }, - "xcb-xlib": { - "description": "XCB Xlib", - "type": "compile", - "test": "qpa/xcb-xlib", - "pkg-config-args": "xcb" - }, - "x11-sm": { - "description": "X11 session management", - "type": "pkgConfig", - "pkg-config-args": "sm ice" - }, "xlib": { "description": "XLib", "type": "compile", "test": "x11/xlib" }, - "xrender": { - "description": "XRender", - "type": "compile", - "test": "x11/xrender" - }, "x11prefix": { "description": "X11 prefix", "type": "getPkgConfigVariable", @@ -855,105 +1138,23 @@ "pkg-config-variable": "xkb_base", "log": "value" }, - "opengl-desktop": { - "description": "Desktop OpenGL", - "type": "compile", - "test": "unix/opengldesktop", - "pkg-config-args": "gl" - }, - "opengl-mingw": { - "description": "Desktop OpenGL", - "type": "compile", - "test": "x11/opengl" - }, - "opengles2": { - "description": "OpenGL ES 2.0", - "type": "compile", - "test": "unix/opengles2", - "pkg-config-args": "glesv2" - }, "opengles3": { "description": "OpenGL ES 3.0", "type": "compile", "test": "unix/opengles3", - "pkg-config-args": "glesv2" + "use": "opengl_es2" }, "opengles31": { "description": "OpenGL ES 3.1", "type": "compile", "test": "unix/opengles31", - "pkg-config-args": "glesv2" - }, - "db2": { - "description": "DB2 (IBM)", - "type": "compile", - "test": "unix/db2" - }, - "ibase": { - "description": "InterBase", - "type": "compile", - "test": "unix/ibase" - }, - "mysql": { - "description": "MySQL", - "type": "mysqlCompile", - "test": "unix/mysql", - "query": "--libs" - }, - "mysql_r": { - "description": "MySQL (threadsafe)", - "type": "mysqlCompile", - "test": "unix/mysql_r", - "query": "--libs_r" - }, - "oci": { - "description": "OCI (Oracle)", - "type": "compile", - "test": "unix/oci" - }, - "odbc": { - "description": "ODBC", - "type": "compile", - "test": "unix/odbc", - "libs": "-lodbc" - }, - "iodbc": { - "description": "iODBC", - "type": "compile", - "test": "unix/iodbc", - "libs": "-liodbc" - }, - "psql": { - "description": "PostgreSQL", - "type": "psqlCompile", - "test": "unix/psql" - }, - "sqlite2": { - "description": "SQLite (version 2)", - "type": "compile", - "test": "unix/sqlite2" - }, - "sqlite": { - "description": "SQLite (version 3)", - "type": "compile", - "test": "unix/sqlite", - "pkg-config-args": "sqlite3", - "libs": "-lsqlite3 -lz" - }, - "tds": { - "description": "TDS (Sybase)", - "type": "tdsCompile", - "test": "unix/tds" - }, - "directwrite": { - "description": "DirectWrite", - "type": "compile", - "test": "win/directwrite" + "use": "opengl_es2" }, "directwrite2": { "description": "DirectWrite 2", "type": "compile", - "test": "win/directwrite2" + "test": "win/directwrite2", + "use": "directwrite" }, "qpa_default_platform": { "description": "default QPA platform", @@ -1232,21 +1433,20 @@ }, "dlopen": { "description": "dlopen()", - "condition": "tests.dlopen || tests.libdl", + "condition": "tests.dlopen || libs.libdl", "output": [ { "type": "define", "negative": true, "name": "QT_NO_DYNAMIC_LIBRARY" } ] }, "libdl": { "description": "dlopen() in libdl", - "condition": "!tests.dlopen && tests.libdl", + "condition": "!tests.dlopen && libs.libdl", "output": [ { "type": "privateConfig", "negative": true } ] }, "std-atomic64": { "description": "64 bit atomic operations", - "condition": "tests.atomic64 || tests.atomic64_libatomic", + "condition": "tests.atomic64 || libs.libatomic", "output": [ { "type": "define", "negative": true, "name": "QT_NO_STD_ATOMIC64" }, - { "type": "privateConfig", "name": "atomic64-libatomic", - "condition": "!tests.atomic64 && tests.atomic64_libatomic" } + { "type": "privateConfig", "name": "atomic64-libatomic", "condition": "!tests.atomic64" } ] }, "sse2": { @@ -1413,7 +1613,7 @@ }, "alsa": { "description": "ALSA", - "condition": "tests.alsa", + "condition": "libs.alsa", "output": [ "feature" ] }, "evdev": { @@ -1428,7 +1628,7 @@ }, "gbm": { "description": "GBM", - "condition": "tests.gbm", + "condition": "libs.gbm", "output": [ "publicQtConfig" ] }, "getaddrinfo": { @@ -1454,7 +1654,7 @@ "libproxy": { "description": "libproxy", "autoDetect": false, - "condition": "tests.libproxy", + "condition": "libs.libproxy", "output": [ "feature" ] }, "linuxfb": { @@ -1465,11 +1665,8 @@ "directfb": { "description": "DirectFB", "autoDetect": false, - "condition": "tests.directfb", - "output": [ - "publicQtConfig", - { "type": "library", "test": "directfb" } - ] + "condition": "libs.directfb", + "output": [ "publicQtConfig" ] }, "integrityfb": { "description": "INTEGRITY framebuffer", @@ -1478,12 +1675,12 @@ }, "kms": { "description": "KMS", - "condition": "tests.kms", + "condition": "libs.drm", "output": [ "publicQtConfig" ] }, "mirclient": { "description": "Mir client", - "condition": "tests.mirclient", + "condition": "libs.mirclient", "output": [ "publicQtConfig" ] }, "mremap": { @@ -1493,13 +1690,13 @@ }, "mtdev": { "description": "mtdev", - "condition": "tests.mtdev", + "condition": "libs.mtdev", "output": [ "privateFeature" ] }, "journald": { "description": "journald", "autoDetect": false, - "condition": "tests.journald", + "condition": "libs.journald", "output": [ "privateConfig" ] }, "posix_fallocate": { @@ -1520,26 +1717,26 @@ }, "slog2": { "description": "slog2", - "condition": "tests.slog2", + "condition": "libs.slog2", "emitIf": "config.qnx", "output": [ "privateConfig" ] }, "qqnx_imf": { "description": "IMF", "emitIf": "config.qnx", - "condition": "tests.imf", + "condition": "libs.imf", "output": [ "privateConfig" ] }, "qqnx_pps": { "description": "PPS", "emitIf": "config.qnx", - "condition": "tests.pps", + "condition": "libs.pps", "output": [ "privateConfig" ] }, "lgmon": { "description": "lgmon", "emitIf": "config.qnx", - "condition": "tests.lgmon", + "condition": "libs.lgmon", "output": [ "privateConfig" ] }, "poll_ppoll": { @@ -1590,12 +1787,12 @@ }, "tslib": { "description": "tslib", - "condition": "tests.tslib", + "condition": "libs.tslib", "output": [ "privateFeature" ] }, "corewlan": { "description": "CoreWLan", - "condition": "tests.corewlan", + "condition": "libs.corewlan", "emitIf": "config.darwin", "output": [ "feature" ] }, @@ -1622,10 +1819,10 @@ "description": " Qt directly linked to OpenSSL", "enable": "input.openssl == 'linked'", "disable": "input.openssl != 'linked'", - "condition": "features.openssl && tests.openssl-libs", + "condition": "features.openssl && libs.openssl", "output": [ "publicQtConfig", - { "type": "varAssign", "name": "OPENSSL_LIBS", "value": "tests.openssl-libs.libs", "eval": "true" }, + { "type": "varAssign", "name": "OPENSSL_LIBS", "value": "libs.openssl.libs", "eval": "true" }, { "type": "define", "name": "QT_LINKED_OPENSSL" } ] }, @@ -1652,38 +1849,29 @@ }, "glib": { "description": "GLib", - "condition": "tests.glib", - "output": [ - "feature", - { "type": "library", "test": "glib" } - ] + "condition": "libs.glib", + "output": [ "feature" ] }, "gtk3": { "description": "GTK+", "autoDetect": "!config.darwin", - "condition": "features.glib && tests.gtk", - "output": [ - "publicQtConfig", - { "type": "library", "test": "gtk" } - ] + "condition": "features.glib && libs.gtk3", + "output": [ "publicQtConfig" ] }, "icu": { "description": "ICU", "autoDetect": "!config.win32", - "condition": "tests.icu", + "condition": "libs.icu", "output": [ "publicQtConfig" ] }, "pulseaudio": { "description": "PulseAudio", - "condition": "tests.pulseaudio", - "output": [ - "feature", - { "type": "library", "test": "pulseaudio" } - ] + "condition": "libs.pulseaudio", + "output": [ "feature" ] }, "cups": { "description": "CUPS", - "condition": "tests.cups", + "condition": "libs.cups", "output": [ "feature" ] }, "jpeg": { @@ -1698,7 +1886,7 @@ "description": " Using system libjpeg", "disable": "input.libjpeg == 'qt'", "enable": "input.libjpeg == 'system'", - "condition": "features.jpeg && tests.libjpeg", + "condition": "features.jpeg && libs.libjpeg", "output": [ "publicQtConfig" ] }, "gif": { @@ -1720,12 +1908,12 @@ "description": " Using system libpng", "disable": "input.libpng == 'qt'", "enable": "input.libpng == 'system'", - "condition": "features.png && tests.libpng", + "condition": "features.png && libs.libpng", "output": [ "publicQtConfig" ] }, "system-zlib": { "description": "Using system zlib", - "condition": "config.darwin || tests.zlib", + "condition": "config.darwin || libs.zlib", "output": [ "publicQtConfig" ] }, "iconv": { @@ -1750,7 +1938,7 @@ "description": "GNU iconv", "enable": "input.iconv == 'gnu'", "disable": "input.iconv == 'posix' || input.iconv == 'sun' || input.iconv == 'no'", - "condition": "!config.win32 && !features.posix-libiconv && !features.sun-libiconv && tests.gnu-iconv", + "condition": "!config.win32 && !features.posix-libiconv && !features.sun-libiconv && libs.gnu_iconv", "output": [ "publicQtConfig" ] }, "freetype": { @@ -1762,16 +1950,13 @@ "enable": "input.freetype == 'system'", "disable": "input.freetype == 'qt'", "autoDetect": "!config.win32", - "condition": "features.freetype && tests.freetype", + "condition": "features.freetype && libs.freetype", "output": [ "publicQtConfig" ] }, "fontconfig": { "description": "Fontconfig", - "condition": "features.system-freetype && tests.fontconfig", - "output": [ - "feature", - { "type": "library", "test": "fontconfig" } - ] + "condition": "features.system-freetype && libs.fontconfig", + "output": [ "feature" ] }, "harfbuzz": { "description": "HarfBuzz", @@ -1782,7 +1967,7 @@ "enable": "input.harfbuzz == 'system'", "disable": "input.harfbuzz == 'qt'", "autoDetect": "!config.darwin", - "condition": "features.harfbuzz && tests.harfbuzz", + "condition": "features.harfbuzz && libs.harfbuzz", "output": [ "publicQtConfig" ] }, "concurrent": { @@ -1798,17 +1983,14 @@ "description": "Qt D-Bus directly linked to libdbus", "enable": "input.dbus == 'linked'", "disable": "input.dbus == 'runtime'", - "condition": "features.dbus && tests.dbus", - "output": [ - "publicQtConfig", - { "type": "library", "name": "dbus", "test": "dbus" } - ] + "condition": "features.dbus && libs.dbus", + "output": [ "publicQtConfig" ] }, "host-dbus": { "description": "Qt D-Bus (Host)", "autoDetect": "!config.android", - "condition": "tests.host-dbus", - "output": [ { "type": "varAppend", "name": "QT_HOST_CFLAGS_DBUS", "value": "tests.host-dbus.cflags", "eval": "true" } ] + "condition": "libs.host_dbus", + "output": [ { "type": "varAppend", "name": "QT_HOST_CFLAGS_DBUS", "value": "libs.host_dbus.cflags", "eval": "true" } ] }, "skip_modules": { "output": [ { "type": "varAssign", "name": "QT_SKIP_MODULES", "value": "tests.skip_modules.value" } ] @@ -1839,11 +2021,8 @@ }, "egl": { "description": "EGL", - "condition": "features.opengl && tests.egl", - "output": [ - "feature", - { "type": "library", "test": "egl" } - ] + "condition": "features.opengl && libs.egl", + "output": [ "feature" ] }, "egl_x11": { "description": "EGL on X11", @@ -1883,43 +2062,31 @@ }, "eglfs_viv_wl": { "description": "EGLFS i.Mx6 Wayland", - "condition": "features.eglfs_viv && tests.wayland-server", + "condition": "features.eglfs_viv && libs.wayland_server", "output": [ "publicQtConfig" ] }, "libudev": { "description": "udev", - "condition": "tests.libudev", - "output": [ - "privateFeature", - { "type": "library", "test": "libudev" } - ] + "condition": "libs.libudev", + "output": [ "privateFeature" ] }, "libinput": { "description": "libinput", - "condition": "features.libudev && tests.libinput", - "output": [ - "privateFeature", - { "type": "library", "test": "libinput" } - ] + "condition": "features.libudev && libs.libinput", + "output": [ "privateFeature" ] }, "xkbcommon-evdev": { "description": "xkbcommon-evdev", - "condition": "tests.xkbcommon", - "output": [ - "publicQtConfig", - { "type": "library", "test": "xkbcommon" } - ] + "condition": "libs.xkbcommon", + "output": [ "publicQtConfig" ] }, "xkbcommon-system": { "description": "Using system-provided xkbcommon", "emitIf": "features.xcb", "enable": "input.xkbcommon == 'system'", "disable": "input.xkbcommon == 'qt' || input.xkbcommon == 'no'", - "condition": "tests.xkbcommon-x11", - "output": [ - { "type": "publicQtConfig", "negative": true, "name": "xkbcommon-qt" }, - { "type": "library", "name": "xkbcommon", "test": "xkbcommon-x11" } - ] + "condition": "libs.xkbcommon_x11", + "output": [ { "type": "publicQtConfig", "negative": true, "name": "xkbcommon-qt" } ] }, "xkb-config-root": { "description": "XKB config root", @@ -1929,11 +2096,8 @@ }, "xinput2": { "description": "Xinput2", - "condition": "tests.xinput2", - "output": [ - "publicQtConfig", - { "type": "library", "test": "xinput2" } - ] + "condition": "libs.xinput2", + "output": [ "publicQtConfig" ] }, "doubleconversion": { "description": "DoubleConversion", @@ -1943,40 +2107,38 @@ "description": " Using system DoubleConversion", "enable": "input.doubleconversion == 'system'", "disable": "input.doubleconversion == 'qt'", - "condition": "features.doubleconversion && tests.doubleconversion", + "condition": "features.doubleconversion && libs.doubleconversion", "output": [ "publicQtConfig" ] }, "system-pcre": { "description": "Using system PCRE", "disable": "input.pcre == 'qt'", "enable": "input.pcre == 'system'", - "condition": "tests.pcre", + "condition": "libs.pcre", "output": [ { "type": "privateConfig", "negative": true, "name": "pcre" } ] }, "gstreamer-1_0": { "description": "GStreamer 1.0", "disable": "input.gstreamer == '0.10' || input.gstreamer == 'no'", "enable": "input.gstreamer == '1.0'", - "condition": "tests.gstreamer-1_0", + "condition": "libs.gstreamer_1_0", "output": [ { "type": "publicQtConfig", "name": "gstreamer-1.0" } ] }, "gstreamer-0_10": { "description": "GStreamer 0.10", "disable": "input.gstreamer == 'no'", "enable": "input.gstreamer == '0.10'", - "condition": "!features.gstreamer-1_0 && tests.gstreamer-0_10", + "condition": "!features.gstreamer-1_0 && libs.gstreamer_0_10", "output": [ { "type": "publicQtConfig", "name": "gstreamer-0.10" } ] }, "xcb": { "description": "XCB", "autoDetect": "!config.darwin", - "condition": "tests.xcb", + "condition": "libs.xcb", "output": [ "publicQtConfig", { "type": "publicQtConfig", "name": "xcb-qt", "condition": "!features.system-xcb" }, - { "type": "publicQtConfig", "name": "xcb-plugin" }, - { "type": "library", "test": "xcb", "condition": "!features.system-xcb" }, - { "type": "library", "test": "xcb-syslibs", "condition": "features.system-xcb" } + { "type": "publicQtConfig", "name": "xcb-plugin" } ] }, "system-xcb": { @@ -1984,45 +2146,36 @@ "enable": "input.xcb == 'system' || input.xcb == 'yes'", "disable": "input.xcb == 'qt' || input.xcb == 'no'", "autoDetect": "!config.darwin", - "condition": "tests.xcb && tests.xcb-syslibs" + "condition": "libs.xcb && libs.xcb_syslibs" }, "xcb-render": { "description": "XCB render", "emitIf": "features.system-xcb", - "condition": "tests.xcb-render", - "output": [ - "publicQtConfig", - { "type": "library", "test": "xcb-render" } - ] + "condition": "libs.xcb_render", + "output": [ "publicQtConfig" ] }, "xcb-glx": { "description": "XCB GLX", "emitIf": "features.xcb", - "condition": "tests.xcb-glx", - "output": [ - "publicQtConfig", - { "type": "library", "test": "xcb-glx" } - ] + "condition": "libs.xcb_glx", + "output": [ "publicQtConfig" ] }, "xcb-xlib": { "description": "XCB Xlib", "emitIf": "features.xcb", - "condition": "tests.xcb-xlib", + "condition": "libs.xcb_xlib", "output": [ "publicQtConfig" ] }, "xcb-sm": { "description": "xcb-sm", "emitIf": "features.xcb", - "condition": "features.sessionmanager && tests.x11-sm", + "condition": "features.sessionmanager && libs.x11sm", "output": [ "publicQtConfig" ] }, "xkb": { "description": "XCB XKB", - "condition": "features.system-xcb && tests.xcb-xkb", - "output": [ - "privateFeature", - { "type": "library", "test": "xcb-xkb" } - ] + "condition": "features.system-xcb && libs.xcb_xkb", + "output": [ "privateFeature" ] }, "xlib": { "description": "XLib", @@ -2031,7 +2184,7 @@ }, "xrender": { "description": "Xrender", - "condition": "tests.xrender", + "condition": "libs.xrender", "output": [ "feature" ] }, "x11-prefix": { @@ -2043,12 +2196,11 @@ "description": "OpenGL ES 2.0", "enable": "input.opengl == 'es2'", "disable": "input.opengl == 'desktop' || input.opengl == 'no'", - "condition": "!features.opengl-desktop && tests.opengles2", + "condition": "!features.opengl-desktop && libs.opengl_es2", "output": [ "publicQtConfig", { "type": "define", "name": "QT_OPENGL_ES" }, - { "type": "define", "name": "QT_OPENGL_ES_2" }, - { "type": "library", "name": "OPENGL_ES2", "test": "opengles2" } + { "type": "define", "name": "QT_OPENGL_ES_2" } ] }, "opengles3": { @@ -2065,8 +2217,7 @@ "description": "Desktop OpenGL", "enable": "input.opengl == 'desktop'", "disable": "input.opengl == 'es2' || input.opengl == 'no'", - "condition": "(config.win32 && tests.opengl-mingw) || (!config.win32 && tests.opengl-desktop)", - "output": [ { "type": "library", "name": "OPENGL", "test": "opengl-desktop", "condition": "!config.win32" } ] + "condition": "libs.opengl" }, "opengl": { "description": "OpenGL", @@ -2075,53 +2226,42 @@ }, "db2": { "description": "DB2 (IBM)", - "condition": "tests.db2", + "condition": "libs.db2", "output": [ "sqldriver" ] }, "ibase": { "description": "InterBase", - "condition": "tests.ibase", + "condition": "libs.ibase", "output": [ "sqldriver" ] }, "mysql": { "description": "MySql", - "condition": "tests.mysql", - "output": [ - "sqldriver", - { "type": "library", "test": "mysql", "condition": "!features.use_libmysqlclient_r" }, - { "type": "library", "test": "mysql_r", "condition": "features.use_libmysqlclient_r" } - ] + "condition": "libs.mysql", + "output": [ "sqldriver" ] }, "use_libmysqlclient_r": { "description": "MySql (threadsafe)", - "condition": "features.mysql && tests.mysql_r", + "condition": "features.mysql && (libs.mysql.source == 0 || libs.mysql.source == 2)", "output": [ "privateConfig" ] }, "oci": { "description": "OCI (Oracle)", - "condition": "tests.oci", + "condition": "libs.oci", "output": [ "sqldriver" ] }, "odbc": { "description": "ODBC", - "condition": "(!config.darwin && tests.odbc) || tests.iodbc", - "output": [ - "sqldriver", - { "type": "library", "test": "odbc", "condition": "!config.darwin && tests.odbc" }, - { "type": "library", "test": "iodbc", "condition": "config.darwin || !tests.odbc" } - ] + "condition": "libs.odbc", + "output": [ "sqldriver" ] }, "psql": { "description": "PostgreSQL", - "condition": "tests.psql", - "output": [ - "sqldriver", - { "type": "library", "test": "psql" } - ] + "condition": "libs.psql", + "output": [ "sqldriver" ] }, "sqlite2": { "description": "SQLite2", - "condition": "tests.sqlite2", + "condition": "libs.sqlite2", "output": [ "sqldriver" ] }, "sqlite": { @@ -2131,19 +2271,13 @@ "system-sqlite": { "description": " Using system provided SQLite", "autoDetect": false, - "condition": "features.sqlite && tests.sqlite", - "output": [ - "publicQtConfig", - { "type": "library", "test": "sqlite" } - ] + "condition": "features.sqlite && libs.sqlite3", + "output": [ "publicQtConfig" ] }, "tds": { "description": "TDS (Sybase)", - "condition": "tests.tds", - "output": [ - "sqldriver", - { "type": "library", "test": "tds" } - ] + "condition": "libs.tds", + "output": [ "sqldriver" ] }, "fusion-style": { "description": "Fusion Style", @@ -2184,7 +2318,7 @@ "directwrite": { "description": "DirectWrite", "emitIf": "config.win32", - "condition": "tests.directwrite", + "condition": "libs.directwrite", "output": [ "publicQtConfig" ] }, "directwrite2": { @@ -2293,7 +2427,7 @@ XKB configuration data. This is required for keyboard input support." }, { "type": "note", - "condition": "features.openssl-linked && tests.openssl-libs.showNote", + "condition": "features.openssl-linked && libs.openssl.source != 0", "message": "When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. For example: diff --git a/configure.pri b/configure.pri index 20eb120d330..021b0013eeb 100644 --- a/configure.pri +++ b/configure.pri @@ -228,19 +228,14 @@ defineTest(qtConfTest_buildParts) { return(true) } -defineTest(qtConfTest_openssl) { +defineTest(qtConfLibrary_openssl) { libs = $$getenv("OPENSSL_LIBS") - !isEmpty(libs) { $${1}.libs = $$libs export($${1}.libs) + return(true) } - - $${1}.showNote = false - isEmpty(libs): $${1}.showNote = true - export($${1}.showNote) - - return(true) + return(false) } defineTest(qtConfTest_checkCompiler) { @@ -288,7 +283,7 @@ defineReplace(filterLibraryPath) { return($$str) } -defineTest(qtConfTest_psqlCompile) { +defineTest(qtConfLibrary_psqlConfig) { pg_config = $$config.input.psql_config isEmpty(pg_config): \ pg_config = $$qtConfFindInPath("pg_config") @@ -304,21 +299,25 @@ defineTest(qtConfTest_psqlCompile) { $${1}.includedir = "$$val_escape(includedir)" !isEmpty(includedir): \ $${1}.cflags = "-I$$val_escape(includedir)" + export($${1}.libs) + export($${1}.includedir) + export($${1}.cflags) + return(true) } + return(false) +} +defineTest(qtConfLibrary_psqlEnv) { # Respect PSQL_LIBS if set PSQL_LIBS = $$getenv(PSQL_LIBS) - !isEmpty($$PSQL_LIBS): $${1}.libs = $$PSQL_LIBS - - export($${1}.libs) - export($${1}.includedir) - export($${1}.cflags) - - qtConfTest_compile($${1}): return(true) - return(false) + !isEmpty(PSQL_LIBS) { + $${1}.libs = $$PSQL_LIBS + export($${1}.libs) + } + return(true) } -defineTest(qtConfTest_mysqlCompile) { +defineTest(qtConfLibrary_mysqlConfig) { mysql_config = $$config.input.mysql_config isEmpty(mysql_config): \ mysql_config = $$qtConfFindInPath("mysql_config") @@ -346,23 +345,22 @@ defineTest(qtConfTest_mysqlCompile) { export($${1}.libs) export($${1}.includedir) export($${1}.cflags) + return(true) } - - qtConfTest_compile($${1}): return(true) return(false) } -defineTest(qtConfTest_tdsCompile) { +defineTest(qtConfLibrary_sybaseEnv) { libs = sybase = $$getenv(SYBASE) !isEmpty(sybase): \ libs += "-L$${sybase}/lib" libs += $$getenv(SYBASE_LIBS) - $${1}.libs = "$$val_escape(libs)" - export($${1}.libs) - - qtConfTest_compile($${1}): return(true) - return(false) + !isEmpty(libs) { + $${1}.libs = "$$val_escape(libs)" + export($${1}.libs) + } + return(true) } diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index a0e5b1a772f..4846079fb19 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -322,11 +322,75 @@ defineReplace(qtConfPrepareArgs) { return($$args) } -defineTest(qtConfTest_pkgConfig) { +defineTest(qtConfSetupLibraries) { + for (l, config.libraries._KEYS_) { + lpfx = config.libraries.$${l} + # 'export' may be omitted, in which case it falls back to the library's name + !defined($${lpfx}.export, var) { + $${lpfx}.export = $$l + export($${lpfx}.export) + } + isEmpty($${lpfx}.sources._KEYS_): \ + error("Library $$l defines no sources") + for (s, $${lpfx}.sources._KEYS_) { + spfx = $${lpfx}.sources.$${s} + # link back to parent object + $${spfx}.library = $$l + export($${spfx}.library) + # a plain string is transformed into a structure + isEmpty($${spfx}._KEYS_) { + $${spfx}.libs = $$eval($${spfx}) + export($${spfx}.libs) + } + # if the type is missing (implicitly in the case of plain strings), assume 'inline' + isEmpty($${spfx}.type) { + $${spfx}.type = inline + export($${spfx}.type) + } + } + } +} + +# the library is specified inline in a 'libs' field. +# this source type cannot fail. +defineTest(qtConfLibrary_inline) { + lib = $$eval($${1}.library) + !defined($${1}.libs, var): \ + error("'inline' source in library '$$lib' does not specify 'libs'.") + return(true) +} + +# the library is provided by the qmake spec. +# this source type cannot fail. +defineTest(qtConfLibrary_makeSpec) { + spec = $$eval($${1}.spec) + isEmpty(spec): \ + error("makeSpec source in library '$$eval($${1}.library)' does not specify 'spec'.") + + $${1}.includedir = "$$val_escape(QMAKE_INCDIR_$$spec)" + export($${1}.includedir) + $${1}.cflags = "$$val_escape(QMAKE_CFLAGS_$$spec)" + export($${1}.cflags) + libs = + for (l, QMAKE_LIBDIR_$$spec): \ + libs += -L$$l + libs += $$eval(QMAKE_LIBS_$$spec) + $${1}.libs = "$$val_escape(libs)" + export($${1}.libs) + + # the library definition is always in scope, so no point in exporting it. + $${1}.export = false + export($${1}.export) + + return(true) +} + +# the library is found via pkg-config. +defineTest(qtConfLibrary_pkgConfig) { pkg_config = $$qtConfPkgConfig($$eval($${1}.host)) isEmpty(pkg_config): \ return(false) - args = $$qtConfPrepareArgs($$eval($${1}.pkg-config-args)) + args = $$qtConfPrepareArgs($$eval($${1}.args)) !qtConfPkgConfigPackageExists($$pkg_config, $$args): \ return(false) @@ -361,14 +425,117 @@ defineTest(qtConfTest_getPkgConfigVariable) { return(true) } +defineReplace(qtConfLibraryArgs) { + qmake_args = + libs = $$eval($${1}.libs) + !isEmpty(libs): \ + qmake_args += $$system_quote(LIBS += $$libs) + for (b, $${1}.builds._KEYS_): \ + qmake_args += $$system_quote(LIBS_$$upper($$b) += $$eval($${1}.builds.$${b})) + includedir = $$eval($${1}.includedir) + !isEmpty(includedir): \ + qmake_args += $$system_quote(INCLUDEPATH *= $$includedir) + return($$qmake_args) +} + +defineTest(qtConfExportLibrary) { + isEmpty(2): return() + !$$qtConfEvaluate($$eval($${1}.export)): return() + + output = privatePro + + eval(libs = $$eval($${1}.libs)) + eval(cflags = $$eval($${1}.cflags)) + eval(includes = $$eval($${1}.includedir)) + version = $$split($${1}.version, '.') + + NAME = $$upper($$2) + !isEmpty(libs): qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs) + for (b, $${1}.builds._KEYS_): \ + qtConfOutputVar(assign, $$output, QMAKE_LIBS_$${NAME}_$$upper($$b), \ + $$eval($${1}.builds.$${b})) + !isEmpty(cflags): qtConfOutputVar(assign, $$output, QMAKE_CFLAGS_$$NAME, $$cflags) + !isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes) + !isEmpty(version) { + qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MAJOR, $$member(version, 0)) + qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MINOR, $$member(version, 1)) + qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_PATCH, $$member(version, 2)) + } + export(config.output.$${output}) +} + +defineTest(qtConfHandleLibrary) { + lpfx = config.libraries.$$1 + defined($${lpfx}.result, var): return() + + qtLogTestIntro($${lpfx}) + msg = "looking for library $${1}" + write_file($$QMAKE_CONFIG_LOG, msg, append) + + result = false + for (s, $${lpfx}.sources._KEYS_) { + qtLog("Trying source $$s of library $${1}.") + spfx = $${lpfx}.sources.$${s} + + t = $$eval($${spfx}.type) + call = qtConfLibrary_$$t + !defined($$call, test): \ + error("Library $${1} source $${s} has unknown type '$$t'") + + !$$qtConfEvaluate($$eval($${spfx}.condition)) { + qtLog("Source $$s of library $$1 failed condition.") + next() + } + + !$${call}($$spfx) { + qtLog("Source $$s of library $$1 produced no result.") + next() + } + + # if the library defines a test, use it to verify the source. + !isEmpty($${lpfx}.test) { + $${lpfx}.literal_args = $$qtConfLibraryArgs($$spfx) + $${lpfx}.host = $$eval($${spfx}.host) + !qtConfTest_compile($$lpfx) { + qtLog("Source $$s of library $$1 failed verification.") + next() + } + } + + # immediately output the library as well. + qtConfExportLibrary($${spfx}, $$eval($${lpfx}.export)) + + $${lpfx}.source = $$s + export($${lpfx}.source) + result = true + break() + } + + qtLogTestResult($${lpfx}, $$result) + + $${lpfx}.result = $$result + export($${lpfx}.result) +} + +defineTest(qtConfTestPrepare_compile) { + for (u, $$list($$eval($${1}.use))) { + !contains(config.libraries._KEYS_, $$u): \ + error("Test $$1 tries to use undeclared library '$$u'") + qtConfHandleLibrary($$u) + lpfx = config.libraries.$${u} + isEmpty($${lpfx}.source): \ + return(false) + $${1}.literal_args += $$qtConfLibraryArgs($${lpfx}.sources.$$eval($${lpfx}.source)) + } + export($${1}.literal_args) + return(true) +} + defineTest(qtConfTest_compile) { test = $$eval($${1}.test) host = $$eval($${1}.host) isEmpty(host): host = false - # get package config information - qtConfTest_pkgConfig($${1}) - test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test test_out_dir = $$shadowed($$test_dir) !isEmpty($${1}.pro): \ @@ -416,14 +583,6 @@ defineTest(qtConfTest_compile) { qmake_args += $$EXTRA_QMAKE_ARGS } - libs = $$eval($${1}.libs) - !isEmpty(libs): \ - qmake_args += "\"LIBS += $$libs\"" - - includedir = $$eval($${1}.includedir) - !isEmpty(includedir): \ - qmake_args += "\"INCLUDEPATH *= $$includedir\"" - # Clean up after previous run exists($$test_out_dir/Makefile): \ QMAKE_MAKE = "$$QMAKE_MAKE clean && $$QMAKE_MAKE" @@ -431,7 +590,7 @@ defineTest(qtConfTest_compile) { mkpath($$test_out_dir)|error() # add possible command line args - qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) + qmake_args += $$qtConfPrepareArgs($$eval($${1}.args)) $$eval($${1}.literal_args) qtRunLoggedCommand("$$test_cmd_base $$qmake_args $$system_quote($$test_dir)") { qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE"): \ @@ -445,7 +604,19 @@ defineTest(logn) { log("$${1}$$escape_expand(\\n)") } +defineTest(qtLogTestIntro) { + description = $$eval($${1}.description) + isEmpty(description): return() + + msg = "Checking for $${description}... " + log($$msg) + $$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)") + write_file($$QMAKE_CONFIG_LOG, msg, append) +} + defineTest(qtLogTestResult) { + isEmpty($${1}.description): return() + !isEmpty($${1}.log) { field = $$eval($${1}.log) log_msg = $$eval($${1}.$$field) @@ -472,27 +643,27 @@ defineTest(qtRunSingleTest) { tpfx = config.tests.$${1} defined($${tpfx}.result, var): \ return() + result = true type = $$eval($${tpfx}.type) call = "qtConfTest_$$type" !defined($$call, test): \ error("Configure test $${1} refers to nonexistent type $$type") - description = $$eval($${tpfx}.description) - !isEmpty(description) { - msg = "checking for $${description}... " - log($$msg) - $$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)") + preCall = "qtConfTestPrepare_$$type" + defined($$preCall, test): \ + !$${preCall}($${tpfx}): result = false + + $$result { + qtLogTestIntro($${tpfx}) + msg = "executing config test $${1}" write_file($$QMAKE_CONFIG_LOG, msg, append) - } - msg = "executing config test $${1}" - write_file($$QMAKE_CONFIG_LOG, msg, append) + !$${call}($${tpfx}): result = false - result = false - $${call}($${tpfx}): result = true + qtLogTestResult($${tpfx}, $$result) + } - !isEmpty(description): qtLogTestResult($${tpfx}, $$result) $${tpfx}.result = $$result export($${tpfx}.result) } @@ -537,6 +708,19 @@ defineReplace(qtConfEvaluateSingleExpression) { error("Unknown test object $${test} in expression '$${1}'.") qtRunSingleTest($$test) result = $$eval(config.tests.$${test}.$${var}) + } else: contains(e, "^libs\..*") { + !qt_conf_tests_allowed: \ + error("Expression '$${1}' refers to a library, which is not allowed at this stage of configuring.") + lib = $$section(e, ".", 1, 1) + var = $$section(e, ".", 2, -1) + isEmpty(var): \ + var = result + !contains(config.libraries._KEYS_, $$lib): \ + error("Unknown library object $${lib} in expression '$${1}'.") + qtConfHandleLibrary($$lib) + !defined(config.libraries.$${lib}.$${var}, var): \ + var = sources.$$eval(config.libraries.$${lib}.$${source}).$$var + result = $$eval(config.libraries.$${lib}.$${var}) } else: contains(e, "^features\..*") { feature = $$section(e, ".", 1, 1) var = $$section(e, ".", 2, -1) @@ -1067,39 +1251,6 @@ defineTest(qtConfOutput_privateFeature) { } } - -defineTest(qtConfOutput_library) { - !$${2}: return() - - output = privatePro - name = "$$eval($${1}.name)" - isEmpty(name): \ - name = $$eval($${1}.feature) - NAME = $$upper($$replace(name, [-.], _)) - - test = $$eval($${1}.test) - isEmpty(test): \ - error("Output type 'library' used in feature '$$eval($${1}.feature)' without a 'test' entry.") - lookup = "config.tests.$$test" - isEmpty($${lookup}._KEYS_): \ - error("Output type 'library' used in feature '$$eval($${1}.feature)' refers to undefined test '$$test'.") - - eval(libs = $$eval($${lookup}.libs)) - eval(cflags = $$eval($${lookup}.cflags)) - eval(includes = $$eval($${lookup}.includedir)) - version = $$split($${lookup}.version, '.') - - !isEmpty(libs): qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs) - !isEmpty(cflags): qtConfOutputVar(assign, $$output, QMAKE_CFLAGS_$$NAME, $$cflags) - !isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes) - !isEmpty(version) { - qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MAJOR, $$first(version)) - qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MINOR, $$member(version, 1)) - qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_PATCH, $$member(version, 2)) - } - export(config.output.$${output}) -} - defineTest(qtConfProcessOneOutput) { feature = $${1} fpfx = config.features.$${feature} @@ -1163,6 +1314,8 @@ defineTest(qtConfigure) { !parseJson(configure_data, config): \ error("Invalid or non-existent file $${1}.") + qtConfSetupLibraries() + qtConfParseCommandLine() # do early checks, mainly to validate the command line |