automatically add the version header to HEADERS
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Wed, 11 Apr 2012 10:48:43 +0000 (12:48 +0200)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Tue, 19 Jun 2012 14:40:04 +0000 (16:40 +0200)
Change-Id: I7c2e1d852ebdbc5cca7a3a31ab2b4c9ab9faffd9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
13 files changed:
mkspecs/features/qt_module_headers.prf
src/concurrent/concurrent.pro
src/corelib/corelib.pro
src/dbus/dbus.pro
src/gui/gui.pro
src/network/network.pro
src/opengl/opengl.pro
src/platformsupport/platformsupport.pro
src/printsupport/printsupport.pro
src/sql/sql.pro
src/testlib/testlib.pro
src/widgets/widgets.pro
src/xml/xml.pro

index 7f1b726..db697b1 100644 (file)
@@ -1,4 +1,13 @@
 #load up the headers info
 include($$MODULE_BASE_OUTDIR/include/$$TARGET/headers.pri, "", true)
 
+lctarget = $$lower($$TARGET)
+
+MODULE_VERSION_HEADER = $$find(SYNCQT.HEADER_FILES, (^|/)$${lctarget}version\\.h$)
+count(MODULE_VERSION_HEADER, 1) {
+    MODULE_VERSION_HEADER = $$absolute_path($$MODULE_VERSION_HEADER, $$_PRO_FILE_PWD_)
+
+    HEADERS += $$MODULE_VERSION_HEADER
+}
+
 CONFIG += qt_install_headers
index 0ee8e9b..24f976a 100644 (file)
@@ -14,8 +14,6 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
 
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/concurrent/qtconcurrentversion.h
-
 PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
 
 SOURCES += \
index 2a2f204..1561767 100644 (file)
@@ -14,8 +14,6 @@ irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
 
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/corelib/qtcoreversion.h
-
 QMAKE_DOCS = $$PWD/doc/qtcore.qdocconf
 QMAKE_DOCS_INDEX = ../../doc
 
index 05562da..008b309 100644 (file)
@@ -33,8 +33,6 @@ win32 {
 }
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/dbus/qtdbusversion.h
-
 QMAKE_DOCS = $$PWD/doc/qtdbus.qdocconf
 QMAKE_DOCS_INDEX = ../../doc
 
index ec2702a..915943b 100644 (file)
@@ -20,8 +20,6 @@ testcocoon {
     load(testcocoon)
 }
 
-HEADERS += $$QT_SOURCE_TREE/src/gui/qtguiversion.h
-
 QMAKE_DOCS = $$PWD/doc/qtgui.qdocconf
 QMAKE_DOCS_INDEX = ../../doc
 
index ef1b5ba..ef63f7e 100644 (file)
@@ -21,8 +21,6 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
 
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/network/qtnetworkversion.h
-
 QMAKE_DOCS = $$PWD/doc/qtnetwork.qdocconf
 QMAKE_DOCS_INDEX = ../../doc
 
index c2c4d71..e5951de 100644 (file)
@@ -16,8 +16,6 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
 
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/opengl/qtopenglversion.h
-
 contains(QT_CONFIG, opengl):CONFIG += opengl
 contains(QT_CONFIG, opengles1):CONFIG += opengles1
 contains(QT_CONFIG, opengles2):CONFIG += opengles2
index 821d2d0..23d840f 100644 (file)
@@ -16,8 +16,6 @@ load(qt_module_config)
 
 unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
 
-HEADERS += $$PWD/qtplatformsupportversion.h
-
 DEFINES += QT_NO_CAST_FROM_ASCII
 PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
 
index 574d32b..aa5ce2e 100644 (file)
@@ -12,8 +12,6 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
 
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/printsupport/qtprintsupportversion.h
-
 QMAKE_DOCS = $$PWD/doc/qtprintsupport.qdocconf
 QMAKE_DOCS_INDEX = ../../doc
 
index 1b7e1b8..ac73049 100644 (file)
@@ -14,8 +14,6 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
 
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/sql/qtsqlversion.h
-
 DEFINES += QT_NO_CAST_FROM_ASCII
 PRECOMPILED_HEADER = ../corelib/global/qt_pch.h
 SQL_P = sql
index 8a7e872..ee29fa7 100644 (file)
@@ -83,8 +83,6 @@ mac {
 
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/testlib/qttestversion.h
-
 QMAKE_TARGET_PRODUCT = QTestLib
 QMAKE_TARGET_DESCRIPTION = Qt \
     Unit \
index 138db98..ee7a651 100644 (file)
@@ -13,8 +13,6 @@ irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
 
 unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
 
-HEADERS += $$QT_SOURCE_TREE/src/widgets/qtwidgetsversion.h
-
 QMAKE_DOCS = $$PWD/doc/qtwidgets.qdocconf
 QMAKE_DOCS_INDEX = ../../doc
 
index acec241..a890730 100644 (file)
@@ -13,8 +13,6 @@ unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore
 
 load(qt_module_config)
 
-HEADERS += $$QT_SOURCE_TREE/src/xml/qtxmlversion.h
-
 QMAKE_DOCS = $$PWD/doc/qtxml.qdocconf
 QMAKE_DOCS_INDEX = ../../doc