summaryrefslogtreecommitdiffstats
path: root/src/src.pro
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2012-04-04 01:09:13 +0300
committerDenis Shienkov <scapig@yandex.ru>2012-04-04 08:46:39 +0200
commit537c8db46aa8b521c82285c8d4d6ad48f2e1a626 (patch)
tree738cbdb1eef01cb938c9418d5eb1ce9aecc0ce8f /src/src.pro
parent5b1c20b1b74d1aba5642f632745ce24dadc2e131 (diff)
Make the .pri/.pro files compatible with Qt4
There were some warnings previously due to the relevant lines inside the .pro and .pri files: WARNING: foobar/qtserialport/src/src.pro:10: Unable to find file for inclusion qt_module WARNING: foobar/qtserialport/src/src.pro:11: Unable to find file for inclusion qt_module_config Project MESSAGE: Warning: unknown QT: core-private WARNING: Failure to find: qtaddonserialportversion.h These warnings are caused by statements that are only available in Qt5. Hence, all these are now being properly adressed according to the transition wikipage that you can find here: http://wiki.qt-project.org/Transition_from_Qt_4.x_to_Qt5 One additional thing that had to be done in case Qt4, is to include qtserialport module .pri file in order to get the relevant variables filled in, and therefore usable inside the src.pro file. Otherwise those variables do not consist of the expected values since they are not initialized before the relevant project file. You can find some details about that in here: http://wiki.qt-project.org/Creating_a_new_module_or_tool_for_Qt#Library_specific_.pro_files Change-Id: Ie43a583bc11226bbd86132433c6b7a378032d80b Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
Diffstat (limited to 'src/src.pro')
-rw-r--r--src/src.pro14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/src.pro b/src/src.pro
index 8e330971..ec5551ed 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,16 +1,19 @@
+greaterThan(QT_MAJOR_VERSION, 4) {
+ load(qt_module)
+ load(qt_module_config)
+ QT += core-private
+} else {
+ include($$PWD/../modules/qt_serialport.pri)
+}
+
TEMPLATE = lib
TARGET = $$QT.serialport.name
MODULE = serialport
-load(qt_module)
-load(qt_module_config)
-
DESTDIR = $$QT.serialport.libs
VERSION = $$QT.serialport.VERSION
DEFINES += QT_ADDON_SERIALPORT_LIB
-QT += core-private
-
CONFIG += module create_prl
MODULE_PRI = ../modules/qt_serialport.pri
@@ -18,3 +21,4 @@ include($$PWD/src-lib.pri)
mac:QMAKE_FRAMEWORK_BUNDLE_NAME = $$QT.serialport.name
+