From 60985aa42b37217fb4c01ed85bbf6f14410c3491 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 5 Aug 2016 13:35:39 +0200 Subject: Use qtConfig throughout in qtbase Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- src/3rdparty/freetype_dependency.pri | 4 +-- src/3rdparty/harfbuzz_dependency.pri | 4 +-- src/3rdparty/png_dependency.pri | 4 +-- src/3rdparty/sqlite.pri | 2 +- src/3rdparty/zlib_dependency.pri | 2 +- src/angle/src/common/common.pri | 2 +- .../src/compiler/preprocessor/preprocessor.pro | 2 +- src/angle/src/compiler/translator.pro | 2 +- src/concurrent/concurrent.pro | 2 +- src/corelib/Qt5CoreConfigExtras.cmake.in | 2 +- src/corelib/arch/arch.pri | 2 +- src/corelib/codecs/codecs.pri | 8 +++--- src/corelib/io/io.pri | 2 +- src/corelib/kernel/kernel.pri | 12 ++++----- src/corelib/tools/tools.pri | 8 +++--- src/dbus/dbus.pro | 2 +- src/gui/accessible/accessible.pri | 2 +- src/gui/gui.pro | 16 ++++++------ src/gui/image/image.pri | 2 +- src/gui/kernel/kernel.pri | 2 +- src/gui/opengl/opengl.pri | 10 ++++---- src/gui/text/text.pri | 2 +- src/network/kernel/kernel.pri | 2 +- src/network/socket/socket.pri | 4 +-- src/network/ssl/ssl.pri | 6 ++--- src/opengl/opengl.pro | 4 +-- src/openglextensions/openglextensions.pro | 4 +-- .../accessibility/accessibility.pri | 2 +- .../devicediscovery/devicediscovery.pri | 4 +-- .../eglconvenience/eglconvenience.pri | 6 ++--- .../eventdispatchers/eventdispatchers.pri | 2 +- .../fontdatabases/fontdatabases.pri | 4 +-- src/platformsupport/fontdatabases/mac/coretext.pri | 2 +- .../glxconvenience/glxconvenience.pri | 6 ++--- .../input/evdevkeyboard/evdevkeyboard.pri | 3 +-- .../input/evdevmouse/evdevmouse.pri | 3 +-- .../input/evdevtablet/evdevtablet.pri | 3 +-- .../input/evdevtouch/evdevtouch.pri | 5 ++-- src/platformsupport/input/input.pri | 8 +++--- src/platformsupport/input/libinput/libinput.pri | 5 ++-- .../linuxaccessibility/linuxaccessibility.pri | 2 +- .../platformcompositor/platformcompositor.pri | 2 +- src/platformsupport/platformsupport.pro | 2 +- src/plugins/bearer/bearer.pro | 2 +- src/plugins/bearer/corewlan/corewlan.pro | 2 +- src/plugins/generic/generic.pro | 6 ++--- src/plugins/imageformats/imageformats.pro | 6 ++--- src/plugins/imageformats/jpeg/jpeg.pro | 2 +- .../platforminputcontexts/compose/compose.pro | 2 +- .../platforminputcontexts.pro | 2 +- src/plugins/platforms/cocoa/cocoa.pro | 2 +- src/plugins/platforms/directfb/directfb.pro | 2 +- .../eglfs/deviceintegration/deviceintegration.pro | 14 +++++----- src/plugins/platforms/offscreen/offscreen.pro | 2 +- src/plugins/platforms/platforms.pro | 16 ++++++------ src/plugins/platforms/qnx/qnx.pro | 2 +- src/plugins/platforms/windows/windows.pri | 20 +++++++-------- .../xcb/gl_integrations/gl_integrations.pro | 4 +-- .../gl_integrations_plugin_base.pri | 10 ++++---- .../xcb/gl_integrations/xcb_egl/xcb_egl.pro | 2 +- .../xcb/gl_integrations/xcb_glx/xcb_glx.pro | 2 +- src/plugins/platforms/xcb/xcb.pro | 2 +- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 15 +++++------ src/plugins/platformthemes/platformthemes.pro | 2 +- src/plugins/printsupport/printsupport.pro | 6 ++--- src/printsupport/kernel/kernel.pri | 2 +- src/printsupport/widgets/widgets.pri | 2 +- src/src.pro | 30 ++++++++++------------ src/tools/bootstrap/bootstrap.pro | 2 +- src/widgets/accessible/accessible.pri | 2 +- src/widgets/accessible/widgets.pro | 2 +- src/widgets/kernel/kernel.pri | 2 +- src/widgets/util/util.pri | 2 +- src/winmain/winmain.pro | 2 +- 74 files changed, 166 insertions(+), 176 deletions(-) (limited to 'src') diff --git a/src/3rdparty/freetype_dependency.pri b/src/3rdparty/freetype_dependency.pri index 7513e40bfd..012e4af6c3 100644 --- a/src/3rdparty/freetype_dependency.pri +++ b/src/3rdparty/freetype_dependency.pri @@ -1,7 +1,7 @@ -contains(QT_CONFIG, system-freetype) { +qtConfig(system-freetype) { # pull in the proper freetype2 include directory include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri) -} else: contains(QT_CONFIG, freetype) { +} else: qtConfig(freetype) { INCLUDEPATH += $$PWD/freetype/include LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtfreetype$$qtPlatformTargetSuffix() } diff --git a/src/3rdparty/harfbuzz_dependency.pri b/src/3rdparty/harfbuzz_dependency.pri index f39bb62381..5946f403c5 100644 --- a/src/3rdparty/harfbuzz_dependency.pri +++ b/src/3rdparty/harfbuzz_dependency.pri @@ -1,6 +1,6 @@ -contains(QT_CONFIG, system-harfbuzz) { +qtConfig(system-harfbuzz) { QMAKE_USE_PRIVATE += harfbuzz -} else: contains(QT_CONFIG, harfbuzz) { +} else: qtConfig(harfbuzz) { INCLUDEPATH += $$PWD/harfbuzz-ng/include LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtharfbuzzng$$qtPlatformTargetSuffix() } diff --git a/src/3rdparty/png_dependency.pri b/src/3rdparty/png_dependency.pri index 12dbfc5487..50711358a0 100644 --- a/src/3rdparty/png_dependency.pri +++ b/src/3rdparty/png_dependency.pri @@ -1,6 +1,6 @@ -contains(QT_CONFIG, system-png) { +qtConfig(system-png) { QMAKE_USE_PRIVATE += libpng -} else: contains(QT_CONFIG, png) { +} else: qtConfig(png) { INCLUDEPATH += $$PWD/libpng LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtpng$$qtPlatformTargetSuffix() } diff --git a/src/3rdparty/sqlite.pri b/src/3rdparty/sqlite.pri index 29968e323f..87c356870b 100644 --- a/src/3rdparty/sqlite.pri +++ b/src/3rdparty/sqlite.pri @@ -1,7 +1,7 @@ CONFIG(release, debug|release):DEFINES *= NDEBUG DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS3_PARENTHESIS SQLITE_ENABLE_RTREE !contains(CONFIG, largefile):DEFINES += SQLITE_DISABLE_LFS -contains(QT_CONFIG, posix_fallocate):DEFINES += HAVE_POSIX_FALLOCATE=1 +qtConfig(posix_fallocate): DEFINES += HAVE_POSIX_FALLOCATE=1 winrt: DEFINES += SQLITE_OS_WINRT winphone: DEFINES += SQLITE_WIN32_FILEMAPPING_API=1 qnx: DEFINES += _QNX_SOURCE diff --git a/src/3rdparty/zlib_dependency.pri b/src/3rdparty/zlib_dependency.pri index 11ad70621d..6ac7e59158 100644 --- a/src/3rdparty/zlib_dependency.pri +++ b/src/3rdparty/zlib_dependency.pri @@ -1,5 +1,5 @@ # zlib dependency satisfied by bundled 3rd party zlib or system zlib -contains(QT_CONFIG, system-zlib) { +qtConfig(system-zlib) { QMAKE_USE_PRIVATE += zlib } else { INCLUDEPATH += $$PWD/zlib diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri index 9eae06d410..c948e27dc3 100644 --- a/src/angle/src/common/common.pri +++ b/src/angle/src/common/common.pri @@ -1,5 +1,5 @@ # static builds should still link ANGLE dynamically when dynamic GL is enabled -static:contains(QT_CONFIG, dynamicgl) { +static:qtConfig(dynamicgl) { CONFIG -= static CONFIG += shared } diff --git a/src/angle/src/compiler/preprocessor/preprocessor.pro b/src/angle/src/compiler/preprocessor/preprocessor.pro index cbf411623d..f9170b3bee 100644 --- a/src/angle/src/compiler/preprocessor/preprocessor.pro +++ b/src/angle/src/compiler/preprocessor/preprocessor.pro @@ -1,5 +1,5 @@ CONFIG += static -contains(QT_CONFIG, dynamicgl): CONFIG += not_installed +qtConfig(dynamicgl): CONFIG += not_installed include(../../config.pri) INCLUDEPATH = $$ANGLE_DIR/src/compiler/preprocessor diff --git a/src/angle/src/compiler/translator.pro b/src/angle/src/compiler/translator.pro index d48ac70472..cee13d06bb 100644 --- a/src/angle/src/compiler/translator.pro +++ b/src/angle/src/compiler/translator.pro @@ -1,5 +1,5 @@ CONFIG += static -contains(QT_CONFIG, dynamicgl): CONFIG += not_installed +qtConfig(dynamicgl): CONFIG += not_installed include(../config.pri) INCLUDEPATH += \ diff --git a/src/concurrent/concurrent.pro b/src/concurrent/concurrent.pro index fd15a3c758..337f4042bd 100644 --- a/src/concurrent/concurrent.pro +++ b/src/concurrent/concurrent.pro @@ -37,7 +37,7 @@ HEADERS += \ # private headers HEADERS += \ -contains(QT_CONFIG, clock-gettime) { +qtConfig(clock-gettime) { linux-*|hpux-*|solaris-*: LIBS_PRIVATE *= -lrt } diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index a5ed8b2ea3..545b9a3d1e 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -116,7 +116,7 @@ set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$< set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype) -!!IF contains(QT_CONFIG, reduce_exports) +!!IF qtConfig(reduce_exports) set(QT_VISIBILITY_AVAILABLE \"True\") !!ENDIF diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri index 2b9166f0a6..b628bcc6ec 100644 --- a/src/corelib/arch/arch.pri +++ b/src/corelib/arch/arch.pri @@ -4,4 +4,4 @@ HEADERS += \ arch/qatomic_bootstrap.h \ arch/qatomic_cxx11.h -atomic64-libatomic: QMAKE_USE += libatomic +qtConfig(libatomic): QMAKE_USE += libatomic diff --git a/src/corelib/codecs/codecs.pri b/src/corelib/codecs/codecs.pri index 275ade369a..58fde6cfc0 100644 --- a/src/corelib/codecs/codecs.pri +++ b/src/corelib/codecs/codecs.pri @@ -17,7 +17,7 @@ SOURCES += \ codecs/qtsciicodec.cpp \ codecs/qutfcodec.cpp -contains(QT_CONFIG,icu) { +qtConfig(icu) { HEADERS += \ codecs/qicucodec_p.h SOURCES += \ @@ -41,13 +41,13 @@ contains(QT_CONFIG,icu) { codecs/qbig5codec.cpp unix:!qnx:!darwin:!linux-android-* { - contains(QT_CONFIG, iconv) { + qtConfig(iconv) { HEADERS += codecs/qiconvcodec_p.h SOURCES += codecs/qiconvcodec.cpp - contains(QT_CONFIG, gnu-libiconv) { + qtConfig(gnu-libiconv) { DEFINES += GNU_LIBICONV QMAKE_USE_PRIVATE += iconv - } else: contains(QT_CONFIG, sun-libiconv) { + } else: qtConfig(sun-libiconv) { DEFINES += GNU_LIBICONV } } diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index ab345e9aae..cc658afa94 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -169,7 +169,7 @@ win32 { io/qstorageinfo_unix.cpp } - linux|if(qnx:contains(QT_CONFIG, inotify)) { + linux|if(qnx:qtConfig(inotify)) { SOURCES += io/qfilesystemwatcher_inotify.cpp HEADERS += io/qfilesystemwatcher_inotify_p.h } diff --git a/src/corelib/kernel/kernel.pri b/src/corelib/kernel/kernel.pri index fea0d4ae2e..2388bbe9be 100644 --- a/src/corelib/kernel/kernel.pri +++ b/src/corelib/kernel/kernel.pri @@ -147,12 +147,12 @@ unix|integrity { kernel/qpoll_p.h \ kernel/qtimerinfo_unix_p.h - contains(QT_CONFIG, poll_select): SOURCES += kernel/qpoll.cpp - contains(QT_CONFIG, poll_poll): DEFINES += QT_HAVE_POLL - contains(QT_CONFIG, poll_ppoll): DEFINES += QT_HAVE_POLL QT_HAVE_PPOLL - contains(QT_CONFIG, poll_pollts): DEFINES += QT_HAVE_POLL QT_HAVE_POLLTS + qtConfig(poll_select): SOURCES += kernel/qpoll.cpp + qtConfig(poll_poll): DEFINES += QT_HAVE_POLL + qtConfig(poll_ppoll): DEFINES += QT_HAVE_POLL QT_HAVE_PPOLL + qtConfig(poll_pollts): DEFINES += QT_HAVE_POLL QT_HAVE_POLLTS - contains(QT_CONFIG, glib) { + qtConfig(glib) { SOURCES += \ kernel/qeventdispatcher_glib.cpp HEADERS += \ @@ -160,7 +160,7 @@ unix|integrity { QMAKE_USE_PRIVATE += glib } - contains(QT_CONFIG, clock-gettime):include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri) + qtConfig(clock-gettime): include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri) !android { SOURCES += kernel/qsharedmemory_posix.cpp \ diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 252dcf9fdc..7ebd9cf710 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -146,14 +146,14 @@ else:win32 { SOURCES += tools/qlocale_unix.cpp } -contains(QT_CONFIG, system-zlib) { +qtConfig(system-zlib) { include($$PWD/../../3rdparty/zlib_dependency.pri) } else { CONFIG += no_core_dep include($$PWD/../../3rdparty/zlib.pri) } -contains(QT_CONFIG,icu) { +qtConfig(icu) { include($$PWD/../../3rdparty/icu_dependency.pri) SOURCES += tools/qlocale_icu.cpp \ @@ -192,9 +192,9 @@ INCLUDEPATH += ../3rdparty/md5 \ ../3rdparty/md4 \ ../3rdparty/sha3 -contains(QT_CONFIG, system-doubleconversion) { +qtConfig(system-doubleconversion) { QMAKE_USE_PRIVATE += doubleconversion -} else: contains(QT_CONFIG, doubleconversion) { +} else: qtConfig(doubleconversion) { include($$PWD/../../3rdparty/double-conversion/double-conversion.pri) } diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro index f2e066852b..43050dcea2 100644 --- a/src/dbus/dbus.pro +++ b/src/dbus/dbus.pro @@ -4,7 +4,7 @@ MODULE_CONFIG = dbusadaptors dbusinterfaces DEFINES += DBUS_API_SUBJECT_TO_CHANGE QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_DBUS -contains(QT_CONFIG, dbus-linked) { +qtConfig(dbus-linked) { QMAKE_USE_PRIVATE += dbus DEFINES += QT_LINKED_LIBDBUS } diff --git a/src/gui/accessible/accessible.pri b/src/gui/accessible/accessible.pri index b7f341d5b7..8dd821fe6a 100644 --- a/src/gui/accessible/accessible.pri +++ b/src/gui/accessible/accessible.pri @@ -1,6 +1,6 @@ # Qt accessibility module -contains(QT_CONFIG, accessibility) { +qtConfig(accessibility) { HEADERS += \ accessible/qaccessible.h \ accessible/qaccessiblecache_p.h \ diff --git a/src/gui/gui.pro b/src/gui/gui.pro index d1d0041616..a6eaadd6c5 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -1,7 +1,7 @@ TARGET = QtGui QT = core-private -contains(QT_CONFIG, opengl.*): MODULE_CONFIG = opengl +qtConfig(opengl.*): MODULE_CONFIG = opengl DEFINES += QT_NO_USING_NAMESPACE @@ -18,7 +18,7 @@ MODULE_PLUGIN_TYPES = \ egldeviceintegrations # This is here only because the platform plugin is no module, obviously. -contains(QT_CONFIG, angle) { +qtConfig(angle) { MODULE_AUX_INCLUDES = \ \$\$QT_MODULE_INCLUDE_BASE/QtANGLE } @@ -53,7 +53,7 @@ load(cmake_functions) win32: CMAKE_WINDOWS_BUILD = True -contains(QT_CONFIG, angle) { +qtConfig(angle) { CMAKE_GL_INCDIRS = $$CMAKE_INCLUDE_DIR CMAKE_ANGLE_EGL_DLL_RELEASE = libEGL.dll CMAKE_ANGLE_EGL_IMPLIB_RELEASE = libEGL.lib @@ -66,22 +66,22 @@ contains(QT_CONFIG, angle) { CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2 } else { - contains(QT_CONFIG, egl) { + qtConfig(egl) { CMAKE_EGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_EGL) !isEmpty(QMAKE_LIBDIR_EGL): CMAKE_EGL_LIBDIR += $$cmakeTargetPath($$QMAKE_LIBDIR_EGL) } - contains(QT_CONFIG, opengles2) { + qtConfig(opengles2) { !isEmpty(QMAKE_INCDIR_OPENGL_ES2): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL_ES2) CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL_ES2) CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL_ES2) !isEmpty(QMAKE_LIBDIR_OPENGL_ES2): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL_ES2) CMAKE_GL_HEADER_NAME = GLES2/gl2.h CMAKE_QT_OPENGL_IMPLEMENTATION = GLESv2 - } else:contains(QT_CONFIG, opengl) { + } else: qtConfig(opengl) { !isEmpty(QMAKE_INCDIR_OPENGL): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL) CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL) - !contains(QT_CONFIG, dynamicgl): CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL) + !qtConfig(dynamicgl): CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL) !isEmpty(QMAKE_LIBDIR_OPENGL): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL) CMAKE_GL_HEADER_NAME = GL/gl.h mac: CMAKE_GL_HEADER_NAME = gl.h @@ -89,6 +89,6 @@ contains(QT_CONFIG, angle) { } } -contains(QT_CONFIG, egl): CMAKE_EGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_EGL) +qtConfig(egl): CMAKE_EGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_EGL) QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri index fe21ff4cc0..3c4d2c0bbf 100644 --- a/src/gui/image/image.pri +++ b/src/gui/image/image.pri @@ -71,7 +71,7 @@ SOURCES += \ image/qxbmhandler.cpp \ image/qxpmhandler.cpp -contains(QT_CONFIG, png) { +qtConfig(png) { HEADERS += image/qpnghandler_p.h SOURCES += image/qpnghandler.cpp include($$PWD/../../3rdparty/png_dependency.pri) diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index 0e224df1ff..3b7e03a0ff 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -139,7 +139,7 @@ SOURCES += \ kernel/qhighdpiscaling.cpp -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { +qtConfig(opengl(es2)?) { HEADERS += \ kernel/qplatformopenglcontext.h \ kernel/qopenglcontext.h \ diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri index dfaf3042bc..2fc9a0e964 100644 --- a/src/gui/opengl/opengl.pri +++ b/src/gui/opengl/opengl.pri @@ -1,9 +1,9 @@ # Qt gui library, opengl module -contains(QT_CONFIG, opengl):CONFIG += opengl -contains(QT_CONFIG, opengles2):CONFIG += opengles2 +qtConfig(opengl): CONFIG += opengl +qtConfig(opengles2): CONFIG += opengles2 -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { +qtConfig(opengl(es2)?) { HEADERS += opengl/qopengl.h \ opengl/qopengl_p.h \ @@ -63,7 +63,7 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { opengl/qopengltexturehelper.cpp \ opengl/qopenglpixeltransferoptions.cpp - !contains(QT_CONFIG, opengles2) { + !qtConfig(opengles2) { HEADERS += opengl/qopenglfunctions_1_0.h \ opengl/qopenglfunctions_1_1.h \ opengl/qopenglfunctions_1_2.h \ @@ -122,7 +122,7 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { opengl/qopengltimerquery.cpp } - contains(QT_CONFIG, opengles2) { + qtConfig(opengles2) { HEADERS += opengl/qopenglfunctions_es2.h SOURCES += opengl/qopenglfunctions_es2.cpp diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri index be60ba72cc..3fe47a6645 100644 --- a/src/gui/text/text.pri +++ b/src/gui/text/text.pri @@ -85,7 +85,7 @@ SOURCES += \ HEADERS += \ text/qplatformfontdatabase.h -contains(QT_CONFIG, harfbuzz)|contains(QT_CONFIG, system-harfbuzz) { +qtConfig(harfbuzz)|qtConfig(system-harfbuzz) { DEFINES += QT_ENABLE_HARFBUZZ_NG include($$PWD/../../3rdparty/harfbuzz_dependency.pri) diff --git a/src/network/kernel/kernel.pri b/src/network/kernel/kernel.pri index c3e546eabc..e1eb4f7a93 100644 --- a/src/network/kernel/kernel.pri +++ b/src/network/kernel/kernel.pri @@ -62,7 +62,7 @@ mac { osx:SOURCES += kernel/qnetworkproxy_mac.cpp else:win32:SOURCES += kernel/qnetworkproxy_win.cpp -else:contains(QT_CONFIG, libproxy) { +else: qtConfig(libproxy) { SOURCES += kernel/qnetworkproxy_libproxy.cpp QMAKE_USE_PRIVATE += libproxy } diff --git a/src/network/socket/socket.pri b/src/network/socket/socket.pri index b1c0b6bd6e..793ea60b07 100644 --- a/src/network/socket/socket.pri +++ b/src/network/socket/socket.pri @@ -27,7 +27,7 @@ SOURCES += socket/qabstractsocketengine.cpp \ # SCTP support. -contains(QT_CONFIG, sctp) { +qtConfig(sctp) { HEADERS += socket/qsctpserver.h \ socket/qsctpserver_p.h \ socket/qsctpsocket.h \ @@ -80,6 +80,6 @@ integrity: { DEFINES += QT_LOCALSOCKET_TCP } -contains(QT_CONFIG, system-proxies) { +qtConfig(system-proxies) { DEFINES += QT_USE_SYSTEM_PROXIES } diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri index edbbeadf51..8139af50af 100644 --- a/src/network/ssl/ssl.pri +++ b/src/network/ssl/ssl.pri @@ -1,5 +1,5 @@ # OpenSSL support; compile in QSslSocket. -contains(QT_CONFIG, ssl) { +qtConfig(ssl) { HEADERS += ssl/qasn1element_p.h \ ssl/qssl.h \ ssl/qssl_p.h \ @@ -45,7 +45,7 @@ contains(QT_CONFIG, ssl) { ssl/qsslellipticcurve_dummy.cpp } - contains(QT_CONFIG, securetransport) { + qtConfig(securetransport) { HEADERS += ssl/qsslsocket_mac_p.h SOURCES += ssl/qsslcertificate_qt.cpp \ ssl/qssldiffiehellmanparameters_dummy.cpp \ @@ -56,7 +56,7 @@ contains(QT_CONFIG, ssl) { ssl/qsslellipticcurve_dummy.cpp } - contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) { + qtConfig(openssl)|qtConfig(openssl-linked) { HEADERS += ssl/qsslcontext_openssl_p.h \ ssl/qsslsocket_openssl_p.h \ ssl/qsslsocket_openssl_symbols_p.h diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 2386ef5d19..25de6ad670 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -9,8 +9,8 @@ irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused QMAKE_DOCS = $$PWD/doc/qtopengl.qdocconf -contains(QT_CONFIG, opengl):CONFIG += opengl -contains(QT_CONFIG, opengles2):CONFIG += opengles2 +qtConfig(opengl): CONFIG += opengl +qtConfig(opengles2): CONFIG += opengles2 HEADERS += qgl.h \ qgl_p.h \ diff --git a/src/openglextensions/openglextensions.pro b/src/openglextensions/openglextensions.pro index 04a871114b..42ba4152d5 100644 --- a/src/openglextensions/openglextensions.pro +++ b/src/openglextensions/openglextensions.pro @@ -1,8 +1,8 @@ TARGET = QtOpenGLExtensions CONFIG += static -contains(QT_CONFIG, opengl):CONFIG += opengl -contains(QT_CONFIG, opengles2):CONFIG += opengles2 +qtConfig(opengl): CONFIG += opengl +qtConfig(opengles2): CONFIG += opengles2 DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_FOREACH diff --git a/src/platformsupport/accessibility/accessibility.pri b/src/platformsupport/accessibility/accessibility.pri index fb56edbf1a..924f6a512f 100644 --- a/src/platformsupport/accessibility/accessibility.pri +++ b/src/platformsupport/accessibility/accessibility.pri @@ -1,4 +1,4 @@ -contains(QT_CONFIG, accessibility) { +qtConfig(accessibility) { INCLUDEPATH += $$PWD HEADERS += \ diff --git a/src/platformsupport/devicediscovery/devicediscovery.pri b/src/platformsupport/devicediscovery/devicediscovery.pri index 4a92c404d4..f4e9103130 100644 --- a/src/platformsupport/devicediscovery/devicediscovery.pri +++ b/src/platformsupport/devicediscovery/devicediscovery.pri @@ -1,10 +1,10 @@ HEADERS += $$PWD/qdevicediscovery_p.h -contains(QT_CONFIG, libudev) { +qtConfig(libudev) { SOURCES += $$PWD/qdevicediscovery_udev.cpp HEADERS += $$PWD/qdevicediscovery_udev_p.h QMAKE_USE_PRIVATE += libudev -} else: contains(QT_CONFIG, evdev) { +} else: qtConfig(evdev) { SOURCES += $$PWD/qdevicediscovery_static.cpp HEADERS += $$PWD/qdevicediscovery_static_p.h } else { diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri index 1cacaf4a4c..4a93d997fb 100644 --- a/src/platformsupport/eglconvenience/eglconvenience.pri +++ b/src/platformsupport/eglconvenience/eglconvenience.pri @@ -1,4 +1,4 @@ -contains(QT_CONFIG,egl) { +qtConfig(egl) { HEADERS += \ $$PWD/qeglconvenience_p.h \ $$PWD/qeglstreamconvenience_p.h \ @@ -8,7 +8,7 @@ contains(QT_CONFIG,egl) { $$PWD/qeglconvenience.cpp \ $$PWD/qeglstreamconvenience.cpp - contains(QT_CONFIG,opengl) { + qtConfig(opengl) { HEADERS += $$PWD/qeglplatformcontext_p.h \ $$PWD/qeglpbuffer_p.h @@ -19,7 +19,7 @@ contains(QT_CONFIG,egl) { # Avoid X11 header collision, use generic EGL native types DEFINES += QT_EGL_NO_X11 - contains(QT_CONFIG,xlib) { + qtConfig(xlib) { HEADERS += \ $$PWD/qxlibeglintegration_p.h SOURCES += \ diff --git a/src/platformsupport/eventdispatchers/eventdispatchers.pri b/src/platformsupport/eventdispatchers/eventdispatchers.pri index 4a562ace99..fb0f3b3827 100644 --- a/src/platformsupport/eventdispatchers/eventdispatchers.pri +++ b/src/platformsupport/eventdispatchers/eventdispatchers.pri @@ -14,7 +14,7 @@ HEADERS +=\ $$PWD/qwindowsguieventdispatcher_p.h } -contains(QT_CONFIG, glib) { +qtConfig(glib) { SOURCES +=$$PWD/qeventdispatcher_glib.cpp HEADERS +=$$PWD/qeventdispatcher_glib_p.h QMAKE_USE_PRIVATE += glib diff --git a/src/platformsupport/fontdatabases/fontdatabases.pri b/src/platformsupport/fontdatabases/fontdatabases.pri index 12b06d64cc..0ef46d0a1c 100644 --- a/src/platformsupport/fontdatabases/fontdatabases.pri +++ b/src/platformsupport/fontdatabases/fontdatabases.pri @@ -1,11 +1,11 @@ -!win32|contains(QT_CONFIG, freetype):!mac { +!win32|qtConfig(freetype):!darwin { include($$PWD/basic/basic.pri) } unix:!mac { CONFIG += qpa/genericunixfontdatabase include($$PWD/genericunix/genericunix.pri) - contains(QT_CONFIG,fontconfig) { + qtConfig(fontconfig) { include($$PWD/fontconfig/fontconfig.pri) } } diff --git a/src/platformsupport/fontdatabases/mac/coretext.pri b/src/platformsupport/fontdatabases/mac/coretext.pri index 272e7591ba..4140b64b22 100644 --- a/src/platformsupport/fontdatabases/mac/coretext.pri +++ b/src/platformsupport/fontdatabases/mac/coretext.pri @@ -1,7 +1,7 @@ HEADERS += $$PWD/qcoretextfontdatabase_p.h $$PWD/qfontengine_coretext_p.h OBJECTIVE_SOURCES += $$PWD/qfontengine_coretext.mm $$PWD/qcoretextfontdatabase.mm -contains(QT_CONFIG, freetype) { +qtConfig(freetype) { include($$QT_SOURCE_TREE/src/3rdparty/freetype_dependency.pri) HEADERS += $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h SOURCES += $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft.cpp diff --git a/src/platformsupport/glxconvenience/glxconvenience.pri b/src/platformsupport/glxconvenience/glxconvenience.pri index 29aa2f6242..80e79ee663 100644 --- a/src/platformsupport/glxconvenience/glxconvenience.pri +++ b/src/platformsupport/glxconvenience/glxconvenience.pri @@ -1,6 +1,6 @@ -contains(QT_CONFIG, xlib) { - contains(QT_CONFIG,opengl):!contains(QT_CONFIG,opengles2) { - contains(QT_CONFIG, xrender): QMAKE_USE_PRIVATE += xrender +qtConfig(xlib) { + qtConfig(opengl):!qtConfig(opengles2) { + qtConfig(xrender): QMAKE_USE_PRIVATE += xrender LIBS_PRIVATE += $$QMAKE_LIBS_X11 HEADERS += $$PWD/qglxconvenience_p.h SOURCES += $$PWD/qglxconvenience.cpp diff --git a/src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri b/src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri index 19cc8b1c33..445f230fa5 100644 --- a/src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri +++ b/src/platformsupport/input/evdevkeyboard/evdevkeyboard.pri @@ -7,6 +7,5 @@ SOURCES += \ $$PWD/qevdevkeyboardhandler.cpp \ $$PWD/qevdevkeyboardmanager.cpp -contains(QT_CONFIG, libudev) { +qtConfig(libudev): \ QMAKE_USE_PRIVATE += libudev -} diff --git a/src/platformsupport/input/evdevmouse/evdevmouse.pri b/src/platformsupport/input/evdevmouse/evdevmouse.pri index 103092b7d0..a8c9c663f3 100644 --- a/src/platformsupport/input/evdevmouse/evdevmouse.pri +++ b/src/platformsupport/input/evdevmouse/evdevmouse.pri @@ -6,7 +6,6 @@ SOURCES += \ $$PWD/qevdevmousehandler.cpp \ $$PWD/qevdevmousemanager.cpp -contains(QT_CONFIG, libudev) { +qtConfig(libudev): \ QMAKE_USE_PRIVATE += libudev -} diff --git a/src/platformsupport/input/evdevtablet/evdevtablet.pri b/src/platformsupport/input/evdevtablet/evdevtablet.pri index 2475f76a05..ea1712ad2f 100644 --- a/src/platformsupport/input/evdevtablet/evdevtablet.pri +++ b/src/platformsupport/input/evdevtablet/evdevtablet.pri @@ -6,6 +6,5 @@ SOURCES += \ $$PWD/qevdevtablethandler.cpp \ $$PWD/qevdevtabletmanager.cpp -contains(QT_CONFIG, libudev) { +qtConfig(libudev): \ QMAKE_USE_PRIVATE += libudev -} diff --git a/src/platformsupport/input/evdevtouch/evdevtouch.pri b/src/platformsupport/input/evdevtouch/evdevtouch.pri index 1e9f697868..58fafcd8f9 100644 --- a/src/platformsupport/input/evdevtouch/evdevtouch.pri +++ b/src/platformsupport/input/evdevtouch/evdevtouch.pri @@ -8,11 +8,10 @@ SOURCES += \ INCLUDEPATH += $$PWD/../shared -contains(QT_CONFIG, libudev) { +qtConfig(libudev): \ QMAKE_USE_PRIVATE += libudev -} -contains(QT_CONFIG, mtdev) { +qtConfig(mtdev) { CONFIG += link_pkgconfig PKGCONFIG_PRIVATE += mtdev } diff --git a/src/platformsupport/input/input.pri b/src/platformsupport/input/input.pri index 5ce9e6844f..eb4d8a983d 100644 --- a/src/platformsupport/input/input.pri +++ b/src/platformsupport/input/input.pri @@ -1,18 +1,18 @@ -contains(QT_CONFIG, evdev) { +qtConfig(evdev) { include($$PWD/evdevmouse/evdevmouse.pri) include($$PWD/evdevkeyboard/evdevkeyboard.pri) include($$PWD/evdevtouch/evdevtouch.pri) include($$PWD/evdevtablet/evdevtablet.pri) } -contains(QT_CONFIG, tslib) { +qtConfig(tslib) { include($$PWD/tslib/tslib.pri) } -contains(QT_CONFIG, libinput) { +qtConfig(libinput) { include($$PWD/libinput/libinput.pri) } -contains(QT_CONFIG, evdev)|contains(QT_CONFIG, libinput) { +qtConfig(evdev)|qtConfig(libinput) { include($$PWD/shared/shared.pri) } diff --git a/src/platformsupport/input/libinput/libinput.pri b/src/platformsupport/input/libinput/libinput.pri index d9f64c7449..f922769a37 100644 --- a/src/platformsupport/input/libinput/libinput.pri +++ b/src/platformsupport/input/libinput/libinput.pri @@ -14,8 +14,7 @@ QMAKE_USE_PRIVATE += libudev libinput INCLUDEPATH += $$PWD/../shared -contains(QT_CONFIG, xkbcommon-evdev) { +qtConfig(xkbcommon-evdev): \ QMAKE_USE_PRIVATE += xkbcommon_evdev -} else { +else: \ DEFINES += QT_NO_XKBCOMMON_EVDEV -} diff --git a/src/platformsupport/linuxaccessibility/linuxaccessibility.pri b/src/platformsupport/linuxaccessibility/linuxaccessibility.pri index 1b65fb1cad..1f36b815cf 100644 --- a/src/platformsupport/linuxaccessibility/linuxaccessibility.pri +++ b/src/platformsupport/linuxaccessibility/linuxaccessibility.pri @@ -1,4 +1,4 @@ -contains(QT_CONFIG, accessibility-atspi-bridge) { +qtConfig(accessibility-atspi-bridge) { QT_FOR_PRIVATE += dbus include(../../3rdparty/atspi2/atspi2.pri) diff --git a/src/platformsupport/platformcompositor/platformcompositor.pri b/src/platformsupport/platformcompositor/platformcompositor.pri index 923d7225da..1e908c9998 100644 --- a/src/platformsupport/platformcompositor/platformcompositor.pri +++ b/src/platformsupport/platformcompositor/platformcompositor.pri @@ -1,4 +1,4 @@ -contains(QT_CONFIG, opengl) { +qtConfig(opengl) { SOURCES += $$PWD/qopenglcompositor.cpp \ $$PWD/qopenglcompositorbackingstore.cpp diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index 9f6f3380e1..0f1d709997 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -25,7 +25,7 @@ include(platformcompositor/platformcompositor.pri) # dbus convenience, but not for darwin: the platform # plugins for these platforms do not use dbus and we # don't want to create a false dependency. -!darwin: contains(QT_CONFIG, dbus) { +!darwin:qtConfig(dbus) { include(dbusmenu/dbusmenu.pri) include(dbustray/dbustray.pri) } diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro index 8028e65147..8078a5708c 100644 --- a/src/plugins/bearer/bearer.pro +++ b/src/plugins/bearer/bearer.pro @@ -8,7 +8,7 @@ TEMPLATE = subdirs #win32:SUBDIRS += nla win32:SUBDIRS += generic win32:!winrt: SUBDIRS += nativewifi -mac:contains(QT_CONFIG, corewlan):SUBDIRS += corewlan +darwin:qtConfig(corewlan): SUBDIRS += corewlan mac:SUBDIRS += generic android:SUBDIRS += android diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro index ab0257aecd..1dc09ebdd6 100644 --- a/src/plugins/bearer/corewlan/corewlan.pro +++ b/src/plugins/bearer/corewlan/corewlan.pro @@ -3,7 +3,7 @@ TARGET = qcorewlanbearer QT = core-private network-private LIBS += -framework Foundation -framework SystemConfiguration -contains(QT_CONFIG, corewlan) { +qtConfig(corewlan) { LIBS += -framework CoreWLAN -framework Security } diff --git a/src/plugins/generic/generic.pro b/src/plugins/generic/generic.pro index 182a60fdb5..c0a81d4dc8 100644 --- a/src/plugins/generic/generic.pro +++ b/src/plugins/generic/generic.pro @@ -2,11 +2,11 @@ TEMPLATE = subdirs load(qfeatures) -contains(QT_CONFIG, evdev) { +qtConfig(evdev) { SUBDIRS += evdevmouse evdevtouch evdevkeyboard evdevtablet } -contains(QT_CONFIG, tslib) { +qtConfig(tslib) { SUBDIRS += tslib } @@ -14,7 +14,7 @@ contains(QT_CONFIG, tslib) { SUBDIRS += tuiotouch } -contains(QT_CONFIG, libinput) { +qtConfig(libinput) { SUBDIRS += libinput } diff --git a/src/plugins/imageformats/imageformats.pro b/src/plugins/imageformats/imageformats.pro index f3ed37b722..d2588c1b18 100644 --- a/src/plugins/imageformats/imageformats.pro +++ b/src/plugins/imageformats/imageformats.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -contains(QT_CONFIG, ico): SUBDIRS += ico -contains(QT_CONFIG, jpeg): SUBDIRS += jpeg -contains(QT_CONFIG, gif): SUBDIRS += gif +qtConfig(ico): SUBDIRS += ico +qtConfig(jpeg): SUBDIRS += jpeg +qtConfig(gif): SUBDIRS += gif diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index 3cbf60ec8a..89476e62f5 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -5,7 +5,7 @@ QT += core-private gui-private SOURCES += main.cpp qjpeghandler.cpp HEADERS += main.h qjpeghandler_p.h -contains(QT_CONFIG, system-jpeg) { +qtConfig(system-jpeg) { QMAKE_USE += libjpeg } else { include($$PWD/../../../3rdparty/libjpeg.pri) diff --git a/src/plugins/platforminputcontexts/compose/compose.pro b/src/plugins/platforminputcontexts/compose/compose.pro index 43ddf0d00b..17284874f6 100644 --- a/src/plugins/platforminputcontexts/compose/compose.pro +++ b/src/plugins/platforminputcontexts/compose/compose.pro @@ -12,7 +12,7 @@ HEADERS += $$PWD/qcomposeplatforminputcontext.h \ $$PWD/generator/qtablegenerator.h \ # libxkbcommon -contains(QT_CONFIG, xkbcommon-qt): { +!qtConfig(xkbcommon-system) { include(../../../3rdparty/xkbcommon.pri) } else { QMAKE_USE += xkbcommon diff --git a/src/plugins/platforminputcontexts/platforminputcontexts.pro b/src/plugins/platforminputcontexts/platforminputcontexts.pro index faea54b874..f22b8b69db 100644 --- a/src/plugins/platforminputcontexts/platforminputcontexts.pro +++ b/src/plugins/platforminputcontexts/platforminputcontexts.pro @@ -4,6 +4,6 @@ qtHaveModule(dbus) { !mac:!win32:SUBDIRS += ibus } -contains(QT_CONFIG, xcb-plugin): SUBDIRS += compose +qtConfig(xcb): SUBDIRS += compose diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index 02d8b16110..d9d3cb1627 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -71,7 +71,7 @@ HEADERS += qcocoaintegration.h \ messages.h \ qcocoamimetypes.h -contains(QT_CONFIG, opengl.*) { +qtConfig(opengl.*) { OBJECTIVE_SOURCES += qcocoaglcontext.mm HEADERS += qcocoaglcontext.h diff --git a/src/plugins/platforms/directfb/directfb.pro b/src/plugins/platforms/directfb/directfb.pro index d4977bf40f..de0344ff5c 100644 --- a/src/plugins/platforms/directfb/directfb.pro +++ b/src/plugins/platforms/directfb/directfb.pro @@ -24,7 +24,7 @@ HEADERS = qdirectfbintegration.h \ qdirectfbeglhooks.h # ### port the GL context -contains(QT_CONFIG, directfb_egl) { +qtConfig(directfb_egl) { HEADERS += qdirectfb_egl.h SOURCES += qdirectfb_egl.cpp DEFINES += DIRECTFB_GL_EGL diff --git a/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro b/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro index 769c248d0d..b46b04d149 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro @@ -1,12 +1,12 @@ TEMPLATE = subdirs -contains(QT_CONFIG, egl_x11): SUBDIRS += eglfs_x11 -contains(QT_CONFIG, eglfs_gbm): SUBDIRS += eglfs_kms_support eglfs_kms -contains(QT_CONFIG, eglfs_egldevice): SUBDIRS += eglfs_kms_support eglfs_kms_egldevice -contains(QT_CONFIG, eglfs_brcm): SUBDIRS += eglfs_brcm -contains(QT_CONFIG, eglfs_mali): SUBDIRS += eglfs_mali -contains(QT_CONFIG, eglfs_viv): SUBDIRS += eglfs_viv -contains(QT_CONFIG, eglfs_viv_wl): SUBDIRS += eglfs_viv_wl +qtConfig(egl_x11): SUBDIRS += eglfs_x11 +qtConfig(eglfs_gbm): SUBDIRS += eglfs_kms_support eglfs_kms +qtConfig(eglfs_egldevice): SUBDIRS += eglfs_kms_support eglfs_kms_egldevice +qtConfig(eglfs_brcm): SUBDIRS += eglfs_brcm +qtConfig(eglfs_mali): SUBDIRS += eglfs_mali +qtConfig(eglfs_viv): SUBDIRS += eglfs_viv +qtConfig(eglfs_viv_wl): SUBDIRS += eglfs_viv_wl eglfs_kms_egldevice.depends = eglfs_kms_support eglfs_kms.depends = eglfs_kms_support diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro index 999550a7e1..cc65449b04 100644 --- a/src/plugins/platforms/offscreen/offscreen.pro +++ b/src/plugins/platforms/offscreen/offscreen.pro @@ -13,7 +13,7 @@ HEADERS = qoffscreenintegration.h \ OTHER_FILES += offscreen.json -contains(QT_CONFIG, xlib):contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2) { +qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2) { SOURCES += qoffscreenintegration_x11.cpp HEADERS += qoffscreenintegration_x11.h system(echo "Using X11 offscreen integration with GLX") diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro index 4bed5312ec..8324520725 100644 --- a/src/plugins/platforms/platforms.pro +++ b/src/plugins/platforms/platforms.pro @@ -4,9 +4,9 @@ android: SUBDIRS += android !android: SUBDIRS += minimal -!android:if(!win32|contains(QT_CONFIG, freetype)): SUBDIRS += offscreen +!android:if(!win32|qtConfig(freetype)): SUBDIRS += offscreen -contains(QT_CONFIG, xcb) { +qtConfig(xcb) { SUBDIRS += xcb } @@ -16,7 +16,7 @@ osx: SUBDIRS += cocoa win32:!winrt: SUBDIRS += windows winrt: SUBDIRS += winrt -contains(QT_CONFIG, direct2d) { +qtConfig(direct2d) { SUBDIRS += direct2d } @@ -24,16 +24,16 @@ qnx { SUBDIRS += qnx } -contains(QT_CONFIG, eglfs) { +qtConfig(eglfs) { SUBDIRS += eglfs SUBDIRS += minimalegl } -contains(QT_CONFIG, directfb) { +qtConfig(directfb) { SUBDIRS += directfb } -contains(QT_CONFIG, linuxfb): SUBDIRS += linuxfb +qtConfig(linuxfb): SUBDIRS += linuxfb unix:!android:!darwin: SUBDIRS += vnc @@ -45,6 +45,6 @@ haiku { SUBDIRS += haiku } -contains(QT_CONFIG, mirclient): SUBDIRS += mirclient +qtConfig(mirclient): SUBDIRS += mirclient -contains(QT_CONFIG, integrityfb): SUBDIRS += integrity +qtConfig(integrityfb): SUBDIRS += integrity diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro index 51ffa5624f..e47731476f 100644 --- a/src/plugins/platforms/qnx/qnx.pro +++ b/src/plugins/platforms/qnx/qnx.pro @@ -75,7 +75,7 @@ CONFIG(qqnx_screeneventthread) { LIBS += -lscreen -contains(QT_CONFIG, opengles2) { +qtConfig(opengles2) { SOURCES += qqnxglcontext.cpp \ qqnxeglwindow.cpp diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri index 1cadcd1954..28d7d04db4 100644 --- a/src/plugins/platforms/windows/windows.pri +++ b/src/plugins/platforms/windows/windows.pri @@ -1,7 +1,7 @@ # Note: OpenGL32 must precede Gdi32 as it overwrites some functions. LIBS += -lole32 -luser32 -lwinspool -limm32 -lwinmm -loleaut32 -contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles2):!contains(QT_CONFIG, dynamicgl): LIBS *= -lopengl32 +qtConfig(opengl):!qtConfig(opengles2):!qtConfig(dynamicgl): LIBS *= -lopengl32 mingw: LIBS *= -luuid # For the dialog helpers: @@ -9,8 +9,8 @@ LIBS += -lshlwapi -lshell32 -ladvapi32 DEFINES *= QT_NO_CAST_FROM_ASCII -contains(QT_CONFIG, directwrite) { - contains(QT_CONFIG, directwrite2): \ +qtConfig(directwrite) { + qtConfig(directwrite2): \ DEFINES *= QT_USE_DIRECTWRITE2 SOURCES += $$PWD/qwindowsfontenginedirectwrite.cpp @@ -65,18 +65,18 @@ HEADERS += \ INCLUDEPATH += $$PWD -contains(QT_CONFIG,opengl): HEADERS += $$PWD/qwindowsopenglcontext.h +qtConfig(opengl): HEADERS += $$PWD/qwindowsopenglcontext.h -contains(QT_CONFIG, opengles2) { +qtConfig(opengles2) { SOURCES += $$PWD/qwindowseglcontext.cpp HEADERS += $$PWD/qwindowseglcontext.h -} else: contains(QT_CONFIG,opengl) { +} else: qtConfig(opengl) { SOURCES += $$PWD/qwindowsglcontext.cpp HEADERS += $$PWD/qwindowsglcontext.h } # Dynamic GL needs both WGL and EGL -contains(QT_CONFIG,dynamicgl) { +qtConfig(dynamicgl) { SOURCES += $$PWD/qwindowseglcontext.cpp HEADERS += $$PWD/qwindowseglcontext.h } @@ -111,10 +111,10 @@ contains(QT_CONFIG,dynamicgl) { RESOURCES += $$PWD/openglblacklists.qrc -contains(QT_CONFIG, freetype) { +qtConfig(freetype) { HEADERS += $$PWD/qwindowsfontdatabase_ft.h SOURCES += $$PWD/qwindowsfontdatabase_ft.cpp - contains(QT_CONFIG, system-freetype) { + qtConfig(system-freetype) { include($$QT_SOURCE_TREE/src/platformsupport/fontdatabases/basic/basic.pri) } else { DEFINES *= QT_NO_FONTCONFIG @@ -122,7 +122,7 @@ contains(QT_CONFIG, freetype) { } } -contains(QT_CONFIG, accessibility):include($$PWD/accessible/accessible.pri) +qtConfig(accessibility): include($$PWD/accessible/accessible.pri) DEFINES *= LIBEGL_NAME=$${LIBEGL_NAME} DEFINES *= LIBGLESV2_NAME=$${LIBGLESV2_NAME} diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations.pro b/src/plugins/platforms/xcb/gl_integrations/gl_integrations.pro index 9de0476810..0cdee03f62 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations.pro +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations.pro @@ -1,9 +1,9 @@ TEMPLATE = subdirs -contains(QT_CONFIG, egl): contains(QT_CONFIG, egl_x11): contains(QT_CONFIG, opengl) { +qtConfig(egl):qtConfig(egl_x11):qtConfig(opengl) { SUBDIRS += xcb_egl } -contains(QT_CONFIG, xcb-xlib): contains(QT_CONFIG, opengl): !contains(QT_CONFIG, opengles2) { +qtConfig(xcb-xlib):qtConfig(opengl):!qtConfig(opengles2) { SUBDIRS += xcb_glx } diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri index e97f24e974..57c8f27d9c 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri @@ -4,21 +4,21 @@ INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD/../ # needed by Xcursor ... -contains(QT_CONFIG, xcb-xlib) { +qtConfig(xcb-xlib) { DEFINES += XCB_USE_XLIB - contains(QT_CONFIG, xinput2) { + qtConfig(xinput2) { DEFINES += XCB_USE_XINPUT2 } } # build with session management support -contains(QT_CONFIG, xcb-sm) { +qtConfig(xcb-sm) { DEFINES += XCB_USE_SM } CONFIG += qpa/genericunixfontdatabase -contains(QT_CONFIG, xcb-qt) { +!qtConfig(system-xcb) { DEFINES += XCB_USE_RENDER XCB_DIR = $$clean_path($$PWD/../../../../3rdparty/xcb) INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude @@ -27,7 +27,7 @@ contains(QT_CONFIG, xcb-qt) { } else { qtConfig(xkb): QMAKE_USE += xcb_xkb # to support custom cursors with depth > 1 - contains(QT_CONFIG, xcb-render) { + qtConfig(xcb-render) { DEFINES += XCB_USE_RENDER } QMAKE_USE += xcb_syslibs diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro index 6d52332bad..92e6c18fbe 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro @@ -4,7 +4,7 @@ include(../gl_integrations_plugin_base.pri) CONFIG += egl -contains(QT_CONFIG, xcb-xlib): DEFINES += XCB_USE_XLIB +qtConfig(xcb-xlib): DEFINES += XCB_USE_XLIB HEADERS += \ qxcbeglcontext.h \ diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro index adac4b2e22..88c4144fd9 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro @@ -5,7 +5,7 @@ include(../gl_integrations_plugin_base.pri) #should be removed from the sources DEFINES += XCB_USE_GLX XCB_USE_XLIB -contains(QT_CONFIG, xcb-glx) { +qtConfig(xcb-glx) { DEFINES += XCB_HAS_XCB_GLX QMAKE_USE += xcb_glx } diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro index 5915a59c0b..7840a4583f 100644 --- a/src/plugins/platforms/xcb/xcb.pro +++ b/src/plugins/platforms/xcb/xcb.pro @@ -1,7 +1,7 @@ TEMPLATE = subdirs CONFIG += ordered -contains(QT_CONFIG, xcb-qt):SUBDIRS+=xcb-static +!qtConfig(system-xcb): SUBDIRS += xcb-static SUBDIRS += xcb_qpa_lib.pro SUBDIRS += xcb-plugin.pro diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index f995249c0d..0d5f0ca001 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -40,11 +40,11 @@ HEADERS = \ DEFINES += QT_BUILD_XCB_PLUGIN # needed by Xcursor ... -contains(QT_CONFIG, xcb-xlib) { +qtConfig(xcb-xlib) { DEFINES += XCB_USE_XLIB QMAKE_USE += xcb_xlib - contains(QT_CONFIG, xinput2) { + qtConfig(xinput2) { DEFINES += XCB_USE_XINPUT2 SOURCES += qxcbconnection_xi2.cpp QMAKE_USE += xinput2 @@ -52,7 +52,7 @@ contains(QT_CONFIG, xcb-xlib) { } # build with session management support -contains(QT_CONFIG, xcb-sm) { +qtConfig(xcb-sm) { DEFINES += XCB_USE_SM QMAKE_USE += x11sm SOURCES += qxcbsessionmanager.cpp @@ -63,11 +63,10 @@ include(gl_integrations/gl_integrations.pri) CONFIG += qpa/genericunixfontdatabase -contains(QT_CONFIG, dbus-linked) { +qtConfig(dbus-linked): \ QT += dbus -} -contains(QT_CONFIG, xcb-qt) { +!qtConfig(system-xcb) { DEFINES += XCB_USE_RENDER XCB_DIR = ../../../3rdparty/xcb INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude @@ -77,7 +76,7 @@ contains(QT_CONFIG, xcb-qt) { LIBS += -lxcb-xinerama ### there is no configure test for this! qtConfig(xkb): QMAKE_USE += xcb_xkb # to support custom cursors with depth > 1 - contains(QT_CONFIG, xcb-render) { + qtConfig(xcb-render) { DEFINES += XCB_USE_RENDER QMAKE_USE += xcb_render } @@ -85,7 +84,7 @@ contains(QT_CONFIG, xcb-qt) { } # libxkbcommon -contains(QT_CONFIG, xkbcommon-qt) { +!qtConfig(xkbcommon-system) { include(../../../3rdparty/xkbcommon-x11.pri) } else { QMAKE_USE += xkbcommon diff --git a/src/plugins/platformthemes/platformthemes.pro b/src/plugins/platformthemes/platformthemes.pro index f5f54068a2..166b39ce8c 100644 --- a/src/plugins/platformthemes/platformthemes.pro +++ b/src/plugins/platformthemes/platformthemes.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs -contains(QT_CONFIG, gtk3): SUBDIRS += gtk3 +qtConfig(gtk3): SUBDIRS += gtk3 diff --git a/src/plugins/printsupport/printsupport.pro b/src/plugins/printsupport/printsupport.pro index bd6681f53c..55feaba40c 100644 --- a/src/plugins/printsupport/printsupport.pro +++ b/src/plugins/printsupport/printsupport.pro @@ -1,8 +1,6 @@ +QT += printsupport TEMPLATE = subdirs osx: SUBDIRS += cocoa win32: SUBDIRS += windows -unix:!mac:contains(QT_CONFIG, cups) { - load(qfeatures) - !contains(QT_DISABLED_FEATURES, cups): SUBDIRS += cups -} +unix:!darwin:qtConfig(cups): SUBDIRS += cups diff --git a/src/printsupport/kernel/kernel.pri b/src/printsupport/kernel/kernel.pri index bf95d9e8f6..22d12e4cc3 100644 --- a/src/printsupport/kernel/kernel.pri +++ b/src/printsupport/kernel/kernel.pri @@ -33,7 +33,7 @@ win32 { LIBS_PRIVATE += -lwinspool -lcomdlg32 -lgdi32 -luser32 } -unix:!mac:contains(QT_CONFIG, cups): { +unix:!darwin:qtConfig(cups) { SOURCES += $$PWD/qcups.cpp HEADERS += $$PWD/qcups_p.h } diff --git a/src/printsupport/widgets/widgets.pri b/src/printsupport/widgets/widgets.pri index 8e5cb12a6d..8a98da1718 100644 --- a/src/printsupport/widgets/widgets.pri +++ b/src/printsupport/widgets/widgets.pri @@ -1,7 +1,7 @@ HEADERS += widgets/qprintpreviewwidget.h SOURCES += widgets/qprintpreviewwidget.cpp -unix:!mac:contains(QT_CONFIG, cups): { +unix:!darwin:qtConfig(cups) { HEADERS += widgets/qcupsjobwidget_p.h SOURCES += widgets/qcupsjobwidget.cpp FORMS += widgets/qcupsjobwidget.ui diff --git a/src/src.pro b/src/src.pro index c4da871abe..ec656e483c 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,7 +1,5 @@ TEMPLATE = subdirs -load(qfeatures) - src_qtzlib.file = $$PWD/corelib/qtzlib.pro src_qtzlib.target = sub-zlib @@ -132,9 +130,9 @@ src_plugins.depends = src_sql src_xml src_network src_android.subdir = $$PWD/android # this order is important -!contains(QT_CONFIG, system-zlib)|cross_compile { +!qtConfig(system-zlib)|cross_compile { SUBDIRS += src_qtzlib - !contains(QT_CONFIG, system-zlib) { + !qtConfig(system-zlib) { src_3rdparty_libpng.depends += src_corelib src_3rdparty_freetype.depends += src_corelib } @@ -148,44 +146,44 @@ SUBDIRS += src_corelib src_tools_qlalr TOOLS = src_tools_moc src_tools_rcc src_tools_qlalr win32:SUBDIRS += src_winmain SUBDIRS += src_network src_sql src_xml src_testlib -contains(QT_CONFIG, dbus) { - force_bootstrap|contains(QT_CONFIG, private_tests): \ +qtConfig(dbus) { + force_bootstrap|qtConfig(private_tests): \ SUBDIRS += src_tools_bootstrap_dbus SUBDIRS += src_dbus src_tools_qdbusxml2cpp src_tools_qdbuscpp2xml TOOLS += src_tools_qdbusxml2cpp src_tools_qdbuscpp2xml - contains(QT_CONFIG, accessibility-atspi-bridge): \ + qtConfig(accessibility-atspi-bridge): \ src_platformsupport.depends += src_dbus src_tools_qdbusxml2cpp src_plugins.depends += src_dbus src_tools_qdbusxml2cpp src_tools_qdbuscpp2xml } -contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent -!contains(QT_CONFIG, no-gui) { - contains(QT_CONFIG, harfbuzz):!contains(QT_CONFIG, system-harfbuzz) { +qtConfig(concurrent): SUBDIRS += src_concurrent +qtConfig(gui) { + qtConfig(harfbuzz):!qtConfig(system-harfbuzz) { SUBDIRS += src_3rdparty_harfbuzzng src_gui.depends += src_3rdparty_harfbuzzng } - contains(QT_CONFIG, angle) { + qtConfig(angle) { SUBDIRS += src_angle src_gui.depends += src_angle } - contains(QT_CONFIG, png) { + qtConfig(png) { SUBDIRS += src_3rdparty_libpng src_3rdparty_freetype.depends += src_3rdparty_libpng src_gui.depends += src_3rdparty_libpng } - contains(QT_CONFIG, freetype):!contains(QT_CONFIG, system-freetype) { + qtConfig(freetype):!qtConfig(system-freetype) { SUBDIRS += src_3rdparty_freetype src_platformsupport.depends += src_3rdparty_freetype } SUBDIRS += src_gui src_platformsupport src_platformheaders - contains(QT_CONFIG, opengl(es2)?):SUBDIRS += src_openglextensions + qtConfig(opengl(es2)?): SUBDIRS += src_openglextensions src_plugins.depends += src_gui src_platformsupport src_platformheaders src_testlib.depends += src_gui # if QtGui is enabled, QtTest requires QtGui's headers - !contains(QT_CONFIG, no-widgets) { + qtConfig(widgets) { SUBDIRS += src_tools_uic src_widgets TOOLS += src_tools_uic src_plugins.depends += src_widgets src_testlib.depends += src_widgets # if QtWidgets is enabled, QtTest requires QtWidgets's headers - contains(QT_CONFIG, opengl(es2)?) { + qtConfig(opengl(es2)?) { SUBDIRS += src_opengl src_plugins.depends += src_opengl } diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index b5015ed562..d544288031 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -138,7 +138,7 @@ macx { ../../corelib/io/qstandardpaths_win.cpp } -!contains(QT_CONFIG, system-zlib)|cross_compile { +!qtConfig(system-zlib)|cross_compile { include(../../3rdparty/zlib.pri) } else { CONFIG += no_core_dep diff --git a/src/widgets/accessible/accessible.pri b/src/widgets/accessible/accessible.pri index ac8205b1e3..e63ae28d30 100644 --- a/src/widgets/accessible/accessible.pri +++ b/src/widgets/accessible/accessible.pri @@ -1,6 +1,6 @@ # Qt accessibility module -contains(QT_CONFIG, accessibility) { +qtConfig(accessibility) { HEADERS += \ accessible/qaccessiblewidget.h \ accessible/qaccessiblewidgetfactory_p.h \ diff --git a/src/widgets/accessible/widgets.pro b/src/widgets/accessible/widgets.pro index da8607c637..d04d0da3cc 100644 --- a/src/widgets/accessible/widgets.pro +++ b/src/widgets/accessible/widgets.pro @@ -2,7 +2,7 @@ TARGET = qtaccessiblewidgets QT += core-private gui-private widgets-private -QTDIR_build:REQUIRES += "contains(QT_CONFIG, accessibility)" +QTDIR_build:REQUIRES += "qtConfig(accessibility)" SOURCES += main.cpp \ simplewidgets.cpp \ diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri index b40a33b2af..ad2180bbfd 100644 --- a/src/widgets/kernel/kernel.pri +++ b/src/widgets/kernel/kernel.pri @@ -80,7 +80,7 @@ wince { kernel/qwidgetsfunctions_wince.cpp } -contains(QT_CONFIG, opengl) { +qtConfig(opengl) { HEADERS += kernel/qopenglwidget.h SOURCES += kernel/qopenglwidget.cpp } diff --git a/src/widgets/util/util.pri b/src/widgets/util/util.pri index 700831771d..cb19c1fc95 100644 --- a/src/widgets/util/util.pri +++ b/src/widgets/util/util.pri @@ -29,7 +29,7 @@ SOURCES += \ win32:!winrt { SOURCES += util/qsystemtrayicon_win.cpp -} else:contains(QT_CONFIG, xcb) { +} else: qtConfig(xcb) { SOURCES += util/qsystemtrayicon_x11.cpp } else { SOURCES += util/qsystemtrayicon_qpa.cpp diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro index 2bb7529456..4140ae48de 100644 --- a/src/winmain/winmain.pro +++ b/src/winmain/winmain.pro @@ -10,7 +10,7 @@ QT = core DEFINES += QT_NO_FOREACH -contains(QT_CONFIG, debug_and_release): CONFIG += build_all +qtConfig(debug_and_release): CONFIG += build_all win32-msvc*:QMAKE_CFLAGS_DEBUG -= -Zi win32-msvc*:QMAKE_CXXFLAGS_DEBUG -= -Zi -- cgit v1.2.3