From 131ba187f28065ded8fddcfbf20c83fc259e5f23 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 10 Apr 2012 20:35:04 +0200 Subject: [PATCH] auto-generate QMAKE_PKGCONFIG_REQUIRES and QMAKE_PKGCONFIG_DESCRIPTION less boilerplate, more accuracy Change-Id: I6cc2abd50eafb4901d987c122f10a62ec9ea9da3 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_module_config.prf | 6 ++++++ src/concurrent/concurrent.pro | 2 -- src/dbus/dbus.pro | 6 ------ src/gui/gui.pro | 2 -- src/network/network.pro | 2 -- src/opengl/opengl.pro | 2 -- src/platformsupport/platformsupport.pro | 2 -- src/printsupport/printsupport.pro | 2 -- src/sql/sql.pro | 2 -- src/widgets/widgets.pro | 2 -- src/xml/xml.pro | 2 -- 11 files changed, 6 insertions(+), 24 deletions(-) diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf index 95a30a9..7495c82 100644 --- a/mkspecs/features/qt_module_config.prf +++ b/mkspecs/features/qt_module_config.prf @@ -194,6 +194,12 @@ unix { QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace } +unix|win32-g++* { + for(i, QT):QMAKE_PKGCONFIG_REQUIRES += $$eval(QT.$${i}.name) + isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ + QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module +} + contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code diff --git a/src/concurrent/concurrent.pro b/src/concurrent/concurrent.pro index 5040d59..77202a1 100644 --- a/src/concurrent/concurrent.pro +++ b/src/concurrent/concurrent.pro @@ -8,8 +8,6 @@ CONFIG += exceptions DEFINES += QT_BUILD_CONCURRENT_LIB QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000 -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore - load(qt_module_config) PRECOMPILED_HEADER = ../corelib/global/qt_pch.h diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro index 358c86b..b8afa79 100644 --- a/src/dbus/dbus.pro +++ b/src/dbus/dbus.pro @@ -15,12 +15,6 @@ contains(QT_CONFIG, dbus-linked) { } # INCLUDEPATH += . -unix|win32-g++* { - QMAKE_PKGCONFIG_DESCRIPTION = Qt \ - DBus \ - module - QMAKE_PKGCONFIG_REQUIRES = QtCore -} win32 { wince*:LIBS_PRIVATE += -lws2 else:LIBS_PRIVATE += -lws2_32 \ diff --git a/src/gui/gui.pro b/src/gui/gui.pro index d14e275..49cd90a 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -7,8 +7,6 @@ MODULE_CONFIG = opengl DEFINES += QT_BUILD_GUI_LIB QT_NO_USING_NAMESPACE -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore - load(qt_module_config) # Code coverage with TestCocoon diff --git a/src/network/network.pro b/src/network/network.pro index a1f1698..a0a05df 100644 --- a/src/network/network.pro +++ b/src/network/network.pro @@ -15,8 +15,6 @@ DEFINES += QT_BUILD_NETWORK_LIB QT_NO_USING_NAMESPACE QT = core-private win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x64000000 -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore - load(qt_module_config) QMAKE_DOCS = $$PWD/doc/qtnetwork.qdocconf diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 9e1394f..e6557ac 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -10,8 +10,6 @@ win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x63000000 solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2 irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui - load(qt_module_config) contains(QT_CONFIG, opengl):CONFIG += opengl diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index 1c6ea6c..b0ab9ca 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -10,8 +10,6 @@ DEFINES += QT_BUILD_PLATFORMSUPPORT_LIB load(qt_module_config) -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui - DEFINES += QT_NO_CAST_FROM_ASCII PRECOMPILED_HEADER = ../corelib/global/qt_pch.h diff --git a/src/printsupport/printsupport.pro b/src/printsupport/printsupport.pro index fb8a518..9be1906 100644 --- a/src/printsupport/printsupport.pro +++ b/src/printsupport/printsupport.pro @@ -6,8 +6,6 @@ QT = core-private gui-private widgets-private DEFINES += QT_BUILD_PRINTSUPPORT_LIB QT_NO_USING_NAMESPACE -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui - load(qt_module_config) QMAKE_DOCS = $$PWD/doc/qtprintsupport.qdocconf diff --git a/src/sql/sql.pro b/src/sql/sql.pro index 26e73e5..1f820e8 100644 --- a/src/sql/sql.pro +++ b/src/sql/sql.pro @@ -8,8 +8,6 @@ DEFINES += QT_BUILD_SQL_LIB DEFINES += QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x62000000 -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore - load(qt_module_config) DEFINES += QT_NO_CAST_FROM_ASCII diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro index 2df97fb..4794ea7 100644 --- a/src/widgets/widgets.pro +++ b/src/widgets/widgets.pro @@ -9,8 +9,6 @@ DEFINES += QT_BUILD_WIDGETS_LIB QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000 irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore - QMAKE_DOCS = $$PWD/doc/qtwidgets.qdocconf QMAKE_DOCS_INDEX = ../../doc diff --git a/src/xml/xml.pro b/src/xml/xml.pro index 4b17f62..e754dc2 100644 --- a/src/xml/xml.pro +++ b/src/xml/xml.pro @@ -7,8 +7,6 @@ QT = core-private DEFINES += QT_BUILD_XML_LIB QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x61000000 -unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore - load(qt_module_config) QMAKE_DOCS = $$PWD/doc/qtxml.qdocconf -- 2.7.4