Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
##
## Unofficial Qt Serial Port Library
##
## Copyright (c) 2010 Inbiza Systems Inc. All rights reserved.
##
## This program is free software: you can redistribute it and/or modify it
## under the terms of the GNU Lesser General Public License as published by the
## Free Software Foundation, either version 3 of the License, or (at your
## option) any later version.
##
## This program is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
## more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>
##
##
## @file src.pro
## www.inbiza.com
##
include(../conf.pri)
include(../base.pri)
TEMPLATE = lib
QT -= gui
TARGET = QtSerialPort
DESTDIR = $$QSERIALPORT_LIBDIR
windows:DLLDESTDIR = $$QSERIALPORT_LIBDIR
VERSION = 1.0.0
CONFIG += debug_and_release thread build_all
CONFIG += create_prl
windows|wince*:!staticlib:!static:DEFINES += QSERIALPORT_MAKEDLL
staticlib|static:PRL_EXPORT_DEFINES += QSERIALPORT_STATIC
QSERIALPORT_INC = $$QSERIALPORT_INCBASE/QtSerialPort
QSERIALPORT_CPP = $$QSERIALPORT_SRCBASE
INCLUDEPATH += $$QSERIALPORT_INC $$QSERIALPORT_CPP
unix: {
PRIVATE_HEADERS += \
$$QSERIALPORT_SRCBASE/posix/termioshelper.h
}
windows: {
PRIVATE_HEADERS += \
$$QSERIALPORT_SRCBASE/win32/commdcbhelper.h \
$$QSERIALPORT_SRCBASE/win32/qwincommevtnotifier.h
wince*: {
PRIVATE_HEADERS += $$QSERIALPORT_SRCBASE/win32/wincommevtbreaker.h
}
}
PUBLIC_HEADERS += \
$$QSERIALPORT_INC/qserialport.h \
$$QSERIALPORT_INC/qserialportnative.h \
$$QSERIALPORT_INC/qserialport_export.h \
$$QSERIALPORT_INC/qportsettings.h
HEADERS += $$PRIVATE_HEADERS $$PUBLIC_HEADERS
SOURCES += \
$$QSERIALPORT_CPP/common/qportsettings.cpp \
$$QSERIALPORT_CPP/common/qserialport.cpp
unix: {
SOURCES += \
$$QSERIALPORT_CPP/posix/qserialportnative_posix.cpp \
$$QSERIALPORT_CPP/posix/termioshelper.cpp
}
windows: {
!wince*: {
SOURCES += $$QSERIALPORT_CPP/win32/qserialportnative_win32.cpp
}
else {
SOURCES += \
$$QSERIALPORT_CPP/win32/qserialportnative_wince.cpp \
$$QSERIALPORT_CPP/win32/wincommevtbreaker.cpp
}
SOURCES += \
$$QSERIALPORT_CPP/win32/commdcbhelper.cpp \
$$QSERIALPORT_CPP/win32/qwincommevtnotifier.cpp
}
# create framework on macosx if specified.
macx:lib_bundle: {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$TARGET
CONFIG(debug, debug|release) {
!build_pass:CONFIG += build_all
}
else { #release
!debug_and_release|build_pass {
FRAMEWORK_HEADERS.version = Versions
FRAMEWORK_HEADERS.files = $$PUBLIC_HEADERS $$QSERIALPORT_INC/QSerialPort
FRAMEWORK_HEADERS.path = Headers
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
}
}
framework_dir = /Library/Frameworks
target.path = $$framework_dir
INSTALLS += target
}
macx: {
QMAKE_LFLAGS_SONAME = -Wl,-install_name,"$$DESTDIR/"
}
unix:!macx {
QMAKE_LFLAGS_RPATH = -Wl,-rpath,"$$DESTDIR/"
}
unix:!lib_bundle: {
# install
QSERPORT_INSTALL_DIR = /usr/local/qserialport
QSERPORT_INSTALL_LIBDIR = $$QSERPORT_INSTALL_DIR/lib
QSERPORT_INSTALL_INCDIR = $$QSERPORT_INSTALL_DIR/include
CONFIG += copy_dir_files
message( install dir: $$QSERPORT_INSTALL_DIR )
target.path = $$QSERPORT_INSTALL_LIBDIR
INSTALLS += target
incfiles.path = $$QSERPORT_INSTALL_INCDIR/QtSerialPort
incfiles.files = $$PUBLIC_HEADERS $$QSERIALPORT_INC/QSerialPort
!lib_bundle:INSTALLS += incfiles
manfiles.path = $$DATADIR/man/man1
manfiles.files = $$QSERIALPORT_BASE/man/qserialport1.0
INSTALLS += manfiles
}
!debug_and_release|build_pass {
MOC_DIR = $$QSERIALPORT_BUILDDIR/GeneratedFiles
CONFIG(debug, debug|release) {
OBJECTS_DIR = $$QSERIALPORT_BUILDDIR/Debug
macx: {
TARGET = $$join(TARGET,,,_debug)
}
windows: {
TARGET = $$join(TARGET,,,d)
}
unix:!macx: {
TARGET = $$join(TARGET,,,.debug)
}
} else { # release
OBJECTS_DIR = $$QSERIALPORT_BUILDDIR/Release
}
}