From 26e21f603841edcb2a0bda7cefc6d754441387ff Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Fri, 8 Mar 2013 01:51:36 +0000 Subject: 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 Reviewed-by: Sergey Belyashov --- src/serialport/qt4support/serialport.prf | 11 ++++++----- src/serialport/serialport.pro | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/serialport') diff --git a/src/serialport/qt4support/serialport.prf b/src/serialport/qt4support/serialport.prf index c8bf5ded..460e201f 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 354bacb6..d329a0b7 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 } -- cgit v1.2.3