From f4b7e33c0b39b33542194b06d6268a841a55a469 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 13 Mar 2012 15:53:10 +0100 Subject: [PATCH] make qt_module_config.prf install the module pri file absorb module.prf into qt_installs.prf, as that's where it belongs. add qt_install_module option and automatically set it in qt_module_config. make qt_installs use that option. Change-Id: I860616f3a29a456f7b88ddaffa09375400c8911e Reviewed-by: Joerg Bornemann --- mkspecs/features/module.prf | 8 +------- mkspecs/features/qt_installs.prf | 10 ++++++++++ mkspecs/features/qt_module_config.prf | 1 + src/concurrent/concurrent.pro | 2 +- src/corelib/corelib.pro | 2 +- src/dbus/dbus.pro | 2 +- src/gui/gui.pro | 1 - src/network/network.pro | 1 - src/opengl/opengl.pro | 1 - src/platformsupport/platformsupport.pro | 1 - src/printsupport/printsupport.pro | 1 - src/sql/sql.pro | 1 - src/testlib/testlib.pro | 2 +- src/widgets/widgets.pro | 2 +- src/xml/xml.pro | 1 - 15 files changed, 17 insertions(+), 19 deletions(-) diff --git a/mkspecs/features/module.prf b/mkspecs/features/module.prf index d95c7a418d..699277d961 100644 --- a/mkspecs/features/module.prf +++ b/mkspecs/features/module.prf @@ -1,7 +1 @@ -!isEmpty(MODULE_PRI) { - pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules - pritarget.files = $$MODULE_PRI - INSTALLS += pritarget -} else { - warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects") -} +warning("CONFIG+=module is obsolete. load(qt_module_config) is sufficient.") diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf index 45c0957a49..c2f7fa501f 100644 --- a/mkspecs/features/qt_installs.prf +++ b/mkspecs/features/qt_installs.prf @@ -39,3 +39,13 @@ qt_install_headers { INSTALLS += qpa_headers } +#module +qt_install_module { + !isEmpty(MODULE_PRI) { + pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules + pritarget.files = $$MODULE_PRI + INSTALLS += pritarget + } else { + warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.") + } +} diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf index ff1fc4bcf2..60bbe8d1bc 100644 --- a/mkspecs/features/qt_module_config.prf +++ b/mkspecs/features/qt_module_config.prf @@ -109,6 +109,7 @@ aix-g++* { !static:PRL_EXPORT_DEFINES += QT_SHARED #install directives +CONFIG += qt_install_module load(qt_installs) unix|win32-g++* { diff --git a/src/concurrent/concurrent.pro b/src/concurrent/concurrent.pro index b0809c8939..0ee8e9b89a 100644 --- a/src/concurrent/concurrent.pro +++ b/src/concurrent/concurrent.pro @@ -3,8 +3,8 @@ load(qt_module) TARGET = QtConcurrent QPRO_PWD = $$PWD QT = core-private +CONFIG += exceptions -CONFIG += module exceptions MODULE_PRI = ../modules/qt_concurrent.pri DEFINES += QT_BUILD_CONCURRENT_LIB QT_NO_USING_NAMESPACE diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 77666d4148..2a2f2049e8 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -3,8 +3,8 @@ load(qt_module) TARGET = QtCore QPRO_PWD = $$PWD QT = +CONFIG += moc resources exceptions -CONFIG += module moc resources exceptions MODULE = core # not corelib, as per project file MODULE_PRI = ../modules/qt_core.pri diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro index b1a3e12e1f..05562da485 100644 --- a/src/dbus/dbus.pro +++ b/src/dbus/dbus.pro @@ -3,8 +3,8 @@ load(qt_module) TARGET = QtDBus QPRO_PWD = $$PWD QT = core-private +CONFIG += link_pkgconfig -CONFIG += link_pkgconfig module MODULE_PRI = ../modules/qt_dbus.pri DEFINES += QT_BUILD_DBUS_LIB \ diff --git a/src/gui/gui.pro b/src/gui/gui.pro index b1f4a106a4..ec2702ae8e 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -4,7 +4,6 @@ TARGET = QtGui QPRO_PWD = $$PWD QT = core-private -CONFIG += module MODULE_PRI = ../modules/qt_gui.pri DEFINES += QT_BUILD_GUI_LIB QT_NO_USING_NAMESPACE diff --git a/src/network/network.pro b/src/network/network.pro index 3e1bc6d4e5..ef1b5ba70d 100644 --- a/src/network/network.pro +++ b/src/network/network.pro @@ -4,7 +4,6 @@ load(qt_module) TARGET = QtNetwork QPRO_PWD = $$PWD -CONFIG += module MODULE_PRI = ../modules/qt_network.pri DEFINES += QT_BUILD_NETWORK_LIB QT_NO_USING_NAMESPACE diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index f1589694a8..c2c4d7197e 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -4,7 +4,6 @@ TARGET = QtOpenGL QPRO_PWD = $$PWD QT = core-private gui-private widgets-private -CONFIG += module MODULE_PRI = ../modules/qt_opengl.pri DEFINES += QT_BUILD_OPENGL_LIB diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index 9a279472c9..821d2d0aad 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -5,7 +5,6 @@ QT += core-private gui-private TEMPLATE = lib DESTDIR = $$QT.gui.libs -CONFIG += module CONFIG += staticlib mac:LIBS += -lz -framework CoreFoundation -framework Carbon diff --git a/src/printsupport/printsupport.pro b/src/printsupport/printsupport.pro index 9002ba3996..574d32b710 100644 --- a/src/printsupport/printsupport.pro +++ b/src/printsupport/printsupport.pro @@ -4,7 +4,6 @@ TARGET = QtPrintSupport QPRO_PWD = $$PWD QT = core-private gui-private widgets-private -CONFIG += module MODULE_PRI = ../modules/qt_printsupport.pri DEFINES += QT_BUILD_PRINTSUPPORT_LIB QT_NO_USING_NAMESPACE diff --git a/src/sql/sql.pro b/src/sql/sql.pro index c2345d92ef..1b7e1b8d85 100644 --- a/src/sql/sql.pro +++ b/src/sql/sql.pro @@ -4,7 +4,6 @@ TARGET = QtSql QPRO_PWD = $$PWD QT = core-private -CONFIG += module MODULE_PRI = ../modules/qt_sql.pri DEFINES += QT_BUILD_SQL_LIB diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro index 1a76a3b556..8a7e8724a2 100644 --- a/src/testlib/testlib.pro +++ b/src/testlib/testlib.pro @@ -3,8 +3,8 @@ load(qt_module) TARGET = QtTest QPRO_PWD = $$PWD QT = core-private +CONFIG += exceptions -CONFIG += module exceptions MODULE_PRI = ../modules/qt_testlib.pri INCLUDEPATH += . diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro index fef42b9a64..138db98100 100644 --- a/src/widgets/widgets.pro +++ b/src/widgets/widgets.pro @@ -3,8 +3,8 @@ load(qt_module) TARGET = QtWidgets QPRO_PWD = $$PWD QT = core core-private gui gui-private platformsupport-private +CONFIG += uic -CONFIG += module uic MODULE_PRI = ../modules/qt_widgets.pri DEFINES += QT_BUILD_WIDGETS_LIB QT_NO_USING_NAMESPACE diff --git a/src/xml/xml.pro b/src/xml/xml.pro index 2fff0218e4..acec24108d 100644 --- a/src/xml/xml.pro +++ b/src/xml/xml.pro @@ -4,7 +4,6 @@ TARGET = QtXml QPRO_PWD = $$PWD QT = core-private -CONFIG += module MODULE_PRI = ../modules/qt_xml.pri DEFINES += QT_BUILD_XML_LIB QT_NO_USING_NAMESPACE