summaryrefslogtreecommitdiff
path: root/qtserialport.pro
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2012-11-01 21:23:04 +0400
committerDenis Shienkov <denis.shienkov@gmail.com>2012-11-05 13:57:20 +0100
commitdb46db74eb0b1afb6a2ff34712b419e20a17f49a (patch)
tree5756528ef5d7ad6538d997e5d1900d50d288fe6e /qtserialport.pro
parenteca1a6d30a98861cb811cb2faf8d01334e60dd7c (diff)
downloadqtserialport-db46db74eb0b1afb6a2ff34712b419e20a17f49a.tar.gz
Updating a project tree for compilation fixing
For optimization and build correction for Qt4/Qt5 there was a need for unification and modification of a tree of projects. The previous structure of the project didn't meet the changed requirements for Qt5 that led to errors of build and complication of possibility of correction of errors of build. It is necessary to note the main changes: * Removed not used /modules direcrory with all content, because it is autogenerated. * Moved all contents from /src directory to /src/serialport directory. It was necessary for simplification of the qmake commands at building for Qt5 (in particular, there is no need to fill out a module name since it is the name of directory /serialport). * Changed the exported macro defines Q_ADDON_SERIALPORT_EXPORT to Q_SERIALPORT_EXPORT and QT_ADDON_SERIALPORT_LIB to QT_SERIALPORT_LIB. It was necessary for fixing compilation error for unknown reason on Windows and Qt5 when used MSVC compiler. Checked on Windows and Gnu/Linux, also this patch fixes bug: Task-number: QTPLAYGROUND-5 Change-Id: Idc9ba98115d5961a22ae307c0e4034a56f3223b5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'qtserialport.pro')
-rw-r--r--qtserialport.pro14
1 files changed, 14 insertions, 0 deletions
diff --git a/qtserialport.pro b/qtserialport.pro
new file mode 100644
index 0000000..2d03c94
--- /dev/null
+++ b/qtserialport.pro
@@ -0,0 +1,14 @@
+include(doc/doc.pri)
+
+lessThan(QT_MAJOR_VERSION, 5) {
+ TEMPLATE = subdirs
+ SUBDIRS = src examples tests
+ CONFIG += ordered
+
+ !infile($$OUT_PWD/.qmake.cache, SERIALPORT_PROJECT_ROOT) {
+ system("echo SERIALPORT_PROJECT_ROOT = $$PWD >> $$OUT_PWD/.qmake.cache")
+ system("echo SERIALPORT_BUILD_ROOT = $$OUT_PWD >> $$OUT_PWD/.qmake.cache")
+ }
+} else {
+ load(qt_parts)
+}