From c0cc5052097c723d0331a7619d686af9eb93d33c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 15 Aug 2016 14:40:52 +0200 Subject: 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 --- config.tests/common/libproxy/libproxy.pro | 1 - config.tests/mac/corewlan/corewlan.pro | 1 - config.tests/qpa/direct2d/direct2d.pro | 1 - config.tests/qpa/egl-x11/egl-x11.pro | 9 - config.tests/qpa/egl/egl.pro | 7 - config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 8 - .../qpa/eglfs-egldevice/eglfs-egldevice.pro | 6 - config.tests/qpa/eglfs-mali-2/eglfs-mali-2.pro | 2 - config.tests/qpa/eglfs-mali/eglfs-mali.pro | 2 - config.tests/qpa/eglfs-viv/eglfs-viv.pro | 7 - config.tests/qpa/gbm/gbm.pro | 2 - config.tests/qpa/kms/kms.pro | 6 - config.tests/qpa/mirclient/mirclient.pro | 2 - config.tests/qpa/wayland-server/wayland-server.pro | 2 - config.tests/qpa/xcb-glx/xcb-glx.pro | 3 - config.tests/qpa/xcb-render/xcb-render.pro | 3 - config.tests/qpa/xcb-syslibs/xcb-syslibs.pro | 3 - config.tests/qpa/xcb-xkb/xcb-xkb.pro | 3 - config.tests/qpa/xcb-xlib/xcb-xlib.pro | 3 - config.tests/qpa/xcb/xcb.pro | 3 - config.tests/unix/alsa/alsa.pro | 1 - config.tests/unix/cups/cups.pro | 1 - config.tests/unix/db2/db2.pro | 1 - config.tests/unix/dbus/dbus.pro | 6 + .../unix/doubleconversion/doubleconversion.pro | 1 - config.tests/unix/fontconfig/fontconfig.pro | 1 - config.tests/unix/freetype/freetype.pro | 1 - config.tests/unix/getaddrinfo/getaddrinfo.pro | 1 - config.tests/unix/getifaddrs/getifaddrs.pro | 1 - config.tests/unix/gnu-libiconv/gnu-libiconv.pro | 1 - config.tests/unix/gstreamer/gstreamer.pro | 18 - config.tests/unix/harfbuzz/harfbuzz.pro | 1 - config.tests/unix/ibase/ibase.pro | 1 - config.tests/unix/icu/icu.pro | 6 +- config.tests/unix/iodbc/iodbc.cpp | 46 - config.tests/unix/iodbc/iodbc.pro | 3 - config.tests/unix/ipv6ifname/ipv6ifname.pro | 1 - config.tests/unix/journald/journald.pro | 7 - config.tests/unix/lgmon/lgmon.pro | 1 - config.tests/unix/libdl/libdl.pro | 2 - config.tests/unix/libinput/libinput.pro | 2 - config.tests/unix/libjpeg/libjpeg.pro | 1 - config.tests/unix/libpng/libpng.pro | 6 - config.tests/unix/libudev/libudev.pro | 2 - config.tests/unix/mtdev/mtdev.pro | 3 - config.tests/unix/mysql/mysql.cpp | 3 + config.tests/unix/mysql/mysql.pro | 1 - config.tests/unix/mysql_r/mysql_r.pro | 3 - config.tests/unix/oci/oci.pro | 1 - config.tests/unix/odbc/odbc.cpp | 4 +- config.tests/unix/odbc/odbc.pro | 2 - config.tests/unix/opengldesktop/opengldesktop.pro | 6 - config.tests/unix/opengles2/opengles2.pro | 7 +- config.tests/unix/opengles3/opengles3.pro | 7 +- config.tests/unix/opengles31/opengles31.pro | 6 - config.tests/unix/pcre/pcre.pro | 1 - config.tests/unix/pps/pps.pro | 1 - config.tests/unix/psql/psql.pro | 1 - config.tests/unix/pulseaudio/pulseaudio.pro | 1 - config.tests/unix/qqnx_imf/qqnx_imf.pro | 1 - config.tests/unix/sctp/sctp.pro | 1 - config.tests/unix/slog2/slog2.pro | 1 - config.tests/unix/sqlite2/sqlite2.pro | 1 - config.tests/unix/tds/tds.pro | 1 - config.tests/unix/tslib/tslib.pro | 1 - config.tests/unix/zlib/zlib.pro | 1 - config.tests/win/directwrite/directwrite.pro | 1 - config.tests/win/directwrite2/directwrite2.pro | 1 - config.tests/x11/opengl/opengl.cpp | 47 - config.tests/x11/opengl/opengl.pro | 11 - config.tests/x11/xinput2/xinput2.pro | 1 - config.tests/x11/xrender/xrender.pro | 1 - configure.json | 1232 +++++++++++--------- configure.pri | 50 +- mkspecs/features/qt_configure.prf | 269 ++++- 75 files changed, 937 insertions(+), 916 deletions(-) delete mode 100644 config.tests/unix/iodbc/iodbc.cpp delete mode 100644 config.tests/unix/iodbc/iodbc.pro delete mode 100644 config.tests/unix/libdl/libdl.pro delete mode 100644 config.tests/unix/mysql_r/mysql_r.pro delete mode 100644 config.tests/x11/opengl/opengl.cpp delete mode 100644 config.tests/x11/opengl/opengl.pro diff --git a/config.tests/common/libproxy/libproxy.pro b/config.tests/common/libproxy/libproxy.pro index 51de2021ff..e3183d99e7 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 8db0c8c1e7..97e864f476 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 ab62a1da5c..98527b12a7 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 aceb03dd78..fd8479ba35 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 b5396dab15..2c4ae07e64 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 d8b1c3ec7e..d4afa460f7 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 0bb8c66cb1..2f20d993f5 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 85bcf6484a..de6f85f20f 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 132918c4bc..80f8282842 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 1617ee38ad..2c3dc5cb01 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 19177062a8..1c08eb4e67 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 ff6b1f6299..c823914308 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 b397c2d08a..3e87194e4e 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 c07740d20f..969bc542bb 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 d7fd1d7208..8086e3a388 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 3248b66a67..7555fa9b61 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 23eedb03a7..6363ae90ee 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 a684a869d3..804be7b894 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 03250b4480..0e98a00fd0 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 a48fdbd15f..6363ae90ee 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 6d5d55bcfd..211e9bc899 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 3f8ca99d0f..d19ce7d9a6 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 b7316051f9..ef233fc184 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 c2a01ea269..f9d793b867 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 ae435b9293..8253d0c2a5 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 8360774035..82dcfc80a0 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 c0cc02d564..1a9f06909a 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 cc739118fa..18e40971e5 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 14a89f87b8..db2956a338 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 1ecf94390a..4008f882eb 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 a5e158fa21..7b6fbb4d75 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 32edd6e358..71a7c355cb 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 58787851e1..8c47f66954 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 f92d7cdfb8..eeed0eaff3 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 3ce12390c2..0000000000 --- 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 -#include - -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 68a0bd0ef4..0000000000 --- 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 88203a782c..7574dce180 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 ea765642e6..deb28ae97f 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 7bd094dc86..33633b19f8 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 4016395d35..0000000000 --- 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 150119c504..941a0b73ef 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 01329a11fe..173249c634 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 cdca43171c..72e5e77b06 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 28b8980e2e..b557e7b17b 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 4c7f76c89f..14111c6dc6 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 697148cbcb..3f83cb1e68 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 +#endif #include "mysql.h" diff --git a/config.tests/unix/mysql/mysql.pro b/config.tests/unix/mysql/mysql.pro index 06d1880f08..745f9ee0fb 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 096da69487..0000000000 --- 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 3ffda1ddd7..c9aec08ee0 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 f4a52f9dac..fc36f121c4 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 #endif #include @@ -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 70f3b668da..6c72dc7b1c 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 c3e700c50a..22c0be247d 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 da30b453c6..c84563f62e 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 720985f14d..956a3bc102 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 225180e1c6..7895be9efc 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 7b8bfc6545..a47e6d1e96 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 21bdeedbfb..af9b339f97 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 d0f3761bfb..dae7375be5 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 d75b16f41e..5e36c0aa81 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 c51adb65ad..e1a2d9cecb 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 edcc0a444a..2138254732 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 e65460bb94..269a88a383 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 7e69fdf2f3..b1252721dc 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 6712779d58..f60fc0a602 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 1191120b89..6fc652dd96 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 d9bd03e5df..6a6b324611 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 9a4612ca11..88ff6ee2b8 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 ec37247017..5d6fe24a4b 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 e73c46b9e6..0000000000 --- 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 - -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 d6814f1bd5..0000000000 --- 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 ae8819b3d1..4788f0e14b 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 e7786420fa..ab5c5efa77 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 df4180636f..56fda6200c 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,323 +1026,103 @@ "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", - "test": "unix/ipc_sysv" - }, - "ipc_posix": { - "description": "POSIX IPC", - "type": "compile", - "test": "unix/ipc_posix" - }, - "tslib": { - "description": "tslib", - "type": "compile", - "test": "unix/tslib" - }, - "ppoll": { - "description": "ppoll()", - "type": "compile", - "test": "unix/ppoll" - }, - "pollts": { - "description": "pollts()", - "type": "compile", - "test": "unix/pollts" - }, - "poll": { - "description": "poll()", - "type": "compile", - "test": "unix/poll" - }, - "cloexec": { - "description": "O_CLOEXEC", - "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" - }, - "posix-iconv": { - "description": "POSIX iconv", + "ipc_sysv": { + "description": "SysV IPC", "type": "compile", - "test": "unix/iconv" + "test": "unix/ipc_sysv" }, - "sun-iconv": { - "description": "SUN libiconv", + "ipc_posix": { + "description": "POSIX IPC", "type": "compile", - "test": "unix/sun-libiconv" + "test": "unix/ipc_posix" }, - "gnu-iconv": { - "description": "GNU libiconv", + "ppoll": { + "description": "ppoll()", "type": "compile", - "test": "unix/gnu-libiconv" + "test": "unix/ppoll" }, - "freetype": { - "description": "FreeType", + "pollts": { + "description": "pollts()", "type": "compile", - "test": "unix/freetype" + "test": "unix/pollts" }, - "fontconfig": { - "description": "Fontconfig", + "poll": { + "description": "poll()", "type": "compile", - "test": "unix/fontconfig", - "pkg-config-args": "fontconfig freetype2", - "libs": "-lfontconfig -lfreetype" + "test": "unix/poll" }, - "harfbuzz": { - "description": "HarfBuzz", + "cloexec": { + "description": "O_CLOEXEC", "type": "compile", - "test": "unix/harfbuzz" + "test": "unix/cloexec" }, - "dbus": { - "description": "D-Bus >= 1.2", + "openssl": { + "description": "OpenSSL", "type": "compile", - "test": "unix/dbus", - "pkg-config-args": "dbus-1 >= 1.2" + "test": "unix/openssl" }, - "host-dbus": { - "description": "D-Bus >= 1.2 (host)", - "type": "pkgConfig", - "host": true, - "pkg-config-args": "dbus-1 >= 1.2" + "sctp": { + "description": "SCTP support", + "type": "compile", + "test": "unix/sctp", + "use": "network" }, - "directfb": { - "description": "DirectFB", + "posix-iconv": { + "description": "POSIX iconv", "type": "compile", - "test": "qpa/directfb", - "pkg-config-args": "directfb" + "test": "unix/iconv" }, - "egl": { - "description": "EGL", + "sun-iconv": { + "description": "SUN libiconv", "type": "compile", - "test": "qpa/egl", - "pkg-config-args": "egl" + "test": "unix/sun-libiconv" }, "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 20eb120d33..021b0013ee 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 a0e5b1a772..4846079fb1 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 -- cgit v1.2.3