summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src-lib.pri4
-rw-r--r--src/src.pro14
2 files changed, 12 insertions, 6 deletions
diff --git a/src/src-lib.pri b/src/src-lib.pri
index 36ee3ae..352680c 100644
--- a/src/src-lib.pri
+++ b/src/src-lib.pri
@@ -2,7 +2,9 @@ INCLUDEPATH += $$PWD
linux*:DEFINES += HAVE_LIBUDEV
-HEADERS += qtaddonserialportversion.h
+greaterThan(QT_MAJOR_VERSION, 4) {
+ HEADERS += qtaddonserialportversion.h
+}
PUBLIC_HEADERS += \
$$PWD/serialport-global.h \
diff --git a/src/src.pro b/src/src.pro
index 8e33097..ec5551e 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
+