summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2013-03-08 01:51:36 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-11 09:51:20 +0100
commit26e21f603841edcb2a0bda7cefc6d754441387ff (patch)
tree8121dfd23991272783d9a4169dbb0634eaa78ef4
parent0d5d7cb9b5bcebec79b2de6acb43da1b05ad82f6 (diff)
downloadqtserialport-26e21f603841edcb2a0bda7cefc6d754441387ff.tar.gz
Prefer the library built in the project tree for the examples and tests
This is necessary when the user has a previous QtSerialPort version installed because the examples and tests will pick up the old installed version. That can cause breakages for the "one shot" build in case of API breaks or behavior changes. For consistency, and more importantly for proper explicit usage without raw INCLUDEPATH usage, QMAKE_INCDIR is introduced in place. qtAddLibrary has to be moved to the beginning not to prepend the QtSerialPort include later, and hence to avoid the issue for the example and test builds. This change also removes a left-over line for Mac as it has just been tested that the line is unnecessary. Change-Id: If391b4398a323e0a3eb285bd79d98ec1dd410381 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
-rw-r--r--src/serialport/qt4support/serialport.prf11
-rw-r--r--src/serialport/serialport.pro1
2 files changed, 6 insertions, 6 deletions
diff --git a/src/serialport/qt4support/serialport.prf b/src/serialport/qt4support/serialport.prf
index c8bf5de..460e201 100644
--- a/src/serialport/qt4support/serialport.prf
+++ b/src/serialport/qt4support/serialport.prf
@@ -1,5 +1,8 @@
-!exists($$[QT_INSTALL_HEADERS]/QtSerialPort) {
- INCLUDEPATH += $$QTSERIALPORT_BUILD_ROOT/include $$QTSERIALPORT_BUILD_ROOT/include/QtSerialPort
+qtAddLibrary(QtSerialPort)
+
+!isEmpty(QTSERIALPORT_BUILD_ROOT) {
+ INCLUDEPATH -= $$QMAKE_INCDIR_QT/QtSerialPort
+ QMAKE_INCDIR += $$QTSERIALPORT_BUILD_ROOT/include $$QTSERIALPORT_BUILD_ROOT/include/QtSerialPort
QTSERIALPORT_BUILD_SUBDIR = src/serialport
win32 {
@@ -10,11 +13,9 @@
}
}
- LIBS += -L$$QTSERIALPORT_BUILD_ROOT/$$QTSERIALPORT_BUILD_SUBDIR
+ QMAKE_LIBDIR += $$QTSERIALPORT_BUILD_ROOT/$$QTSERIALPORT_BUILD_SUBDIR
}
-qtAddLibrary(QtSerialPort)
-
mac {
LIBS -= -framework QtSerialPort$${QT_LIBINFIX}
diff --git a/src/serialport/serialport.pro b/src/serialport/serialport.pro
index 354bacb..d329a0b 100644
--- a/src/serialport/serialport.pro
+++ b/src/serialport/serialport.pro
@@ -13,6 +13,5 @@ greaterThan(QT_MAJOR_VERSION, 4) {
TARGET = $$qtLibraryTarget(QtSerialPort$$QT_LIBINFIX)
include($$PWD/qt4support/install-helper.pri)
CONFIG += module create_prl
- win32|mac:CONFIG += debug_and_release
mac:QMAKE_FRAMEWORK_BUNDLE_NAME = $$TARGET
}