diff --git a/mkspecs/features/module.prf b/mkspecs/features/module.prf new file mode 100644 index 0000000000..248f7f516a --- /dev/null +++ b/mkspecs/features/module.prf @@ -0,0 +1,7 @@ +!isEmpty(MODULE_PRI) { + pritarget.path = $$[QT_INSTALL_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/src/corelib/corelib.pro b/src/corelib/corelib.pro index 4efb1b9a22..a31d1e5b7f 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -1,7 +1,11 @@ -MODULE = core TARGET = QtCore QPRO_PWD = $$PWD QT = + +CONFIG += module +MODULE = core # not corelib, as per project file +MODULE_PRI = ../modules/qt_core.pri + DEFINES += QT_BUILD_CORE_LIB QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x67000000 irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro index 08c9ea1fb2..4f2aa7e9b5 100644 --- a/src/dbus/dbus.pro +++ b/src/dbus/dbus.pro @@ -2,7 +2,10 @@ TARGET = QtDBus QPRO_PWD = $$PWD QT = core \ xml -CONFIG += link_pkgconfig + +CONFIG += link_pkgconfig module +MODULE_PRI = ../modules/qt_dbus.pri + DEFINES += QT_BUILD_DBUS_LIB \ DBUS_API_SUBJECT_TO_CHANGE QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 8f72fead8d..878a384696 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -1,6 +1,10 @@ TARGET = QtGui QPRO_PWD = $$PWD QT = core + +CONFIG += module +MODULE_PRI = ../modules/qt_gui.pri + DEFINES += QT_BUILD_GUI_LIB QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x65000000 irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused diff --git a/src/network/network.pro b/src/network/network.pro index 948922b8c1..153961762a 100644 --- a/src/network/network.pro +++ b/src/network/network.pro @@ -1,7 +1,10 @@ # Qt network module - TARGET = QtNetwork QPRO_PWD = $$PWD + +CONFIG += module +MODULE_PRI = ../modules/qt_network.pri + DEFINES += QT_BUILD_NETWORK_LIB QT_NO_USING_NAMESPACE #DEFINES += QLOCALSERVER_DEBUG QLOCALSOCKET_DEBUG #DEFINES += QNETWORKDISKCACHE_DEBUG diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index e7c1c446de..24dbb7aa3e 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -1,6 +1,10 @@ TARGET = QtOpenGL QPRO_PWD = $$PWD QT = core gui + +CONFIG += module +MODULE_PRI = ../modules/qt_opengl.pri + DEFINES += QT_BUILD_OPENGL_LIB DEFINES += QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x63000000 diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro index e185949bef..5451c2d04e 100644 --- a/src/openvg/openvg.pro +++ b/src/openvg/openvg.pro @@ -2,6 +2,9 @@ TARGET = QtOpenVG QT += core \ gui +CONFIG += module +MODULE_PRI = ../modules/qt_openvg.pri + DEFINES+=QT_BUILD_OPENVG_LIB contains(QT_CONFIG, shivavg) { diff --git a/src/sql/sql.pro b/src/sql/sql.pro index 81aa3c06c9..550b24b754 100644 --- a/src/sql/sql.pro +++ b/src/sql/sql.pro @@ -1,6 +1,10 @@ TARGET = QtSql QPRO_PWD = $$PWD QT = core + +CONFIG += module +MODULE_PRI = ../modules/qt_sql.pri + DEFINES += QT_BUILD_SQL_LIB DEFINES += QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x62000000 diff --git a/src/testlib/testlib.pro b/src/testlib/testlib.pro index c25d23db12..311c79379b 100644 --- a/src/testlib/testlib.pro +++ b/src/testlib/testlib.pro @@ -1,6 +1,10 @@ TARGET = QtTest QPRO_PWD = $$PWD QT = core + +CONFIG += module +MODULE_PRI = ../modules/qt_testlib.pri + INCLUDEPATH += . unix:!embedded:QMAKE_PKGCONFIG_DESCRIPTION = Qt \ Unit \ diff --git a/src/uitools/uitools.pro b/src/uitools/uitools.pro index 32c4501375..0af26d9375 100644 --- a/src/uitools/uitools.pro +++ b/src/uitools/uitools.pro @@ -1,9 +1,12 @@ -MODULE = uitools QPRO_PWD = $$PWD TEMPLATE = lib TARGET = $$qtLibraryTarget(QtUiTools) QT = core xml -CONFIG += qt staticlib + +CONFIG += qt staticlib # Not adding module here, since the module pri's are only used for building +MODULE_PRI = ../modules/qt_uitools.pri \ + ../modules/qt_uilib.pri + DESTDIR = $$QMAKE_LIBDIR_QT symbian { diff --git a/src/xml/xml.pro b/src/xml/xml.pro index 019153ce85..e6fce60371 100644 --- a/src/xml/xml.pro +++ b/src/xml/xml.pro @@ -1,6 +1,10 @@ TARGET = QtXml QPRO_PWD = $$PWD QT = core + +CONFIG += module +MODULE_PRI = ../modules/qt_xml.pri + DEFINES += QT_BUILD_XML_LIB QT_NO_USING_NAMESPACE win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x61000000