@@ -9,17 +9,11 @@ CONFIG += c++11
9
9
# DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
10
10
11
11
SOURCES += \
12
- ../../Libs/serial/serial.cpp \
13
- ../../Libs/sheller/Source/crc.c \
14
- ../../Libs/sheller/Source/sheller.c \
15
12
core.cpp \
16
13
main.cpp \
17
14
mainwindow.cpp
18
15
19
16
HEADERS += \
20
- ../../Libs/serial/serial.h \
21
- ../../Libs/sheller/Source/crc.h \
22
- ../../Libs/sheller/Source/sheller.h \
23
17
core.h \
24
18
mainwindow.h
25
19
@@ -30,3 +24,17 @@ FORMS += \
30
24
qnx: target.path = /tmp/ $${TARGET }/bin
31
25
else: unix :!android: target.path = /opt/ $${TARGET }/bin
32
26
!isEmpty (target.path ): INSTALLS += target
27
+
28
+ # Serial as external static library
29
+ win32 :CONFIG (release , debug |release ): LIBS += -L $$PWD /../../Libs/serial/build/release/ -lserial
30
+ else:win32 :CONFIG (debug , debug |release ): LIBS += -L $$PWD /../../Libs/serial/build/debug/ -lserial
31
+ else:unix : LIBS += -L $$PWD /../../Libs/serial/build/ -lserial
32
+
33
+ INCLUDEPATH += $$PWD /../../Libs/serial
34
+ DEPENDPATH += $$PWD /../../Libs/serial
35
+
36
+ win32 -g++:CONFIG (release , debug |release ): PRE_TARGETDEPS += $$PWD /../../Libs/serial/build/release/libserial.a
37
+ else:win32 -g++:CONFIG (debug , debug |release ): PRE_TARGETDEPS += $$PWD /../../Libs/serial/build/debug/libserial.a
38
+ else:win32 :!win32 -g++:CONFIG (release , debug |release ): PRE_TARGETDEPS += $$PWD /../../Libs/serial/build/release/serial.lib
39
+ else:win32 :!win32 -g++:CONFIG (debug , debug |release ): PRE_TARGETDEPS += $$PWD /../../Libs/serial/build/debug/serial.lib
40
+ else:unix : PRE_TARGETDEPS += $$PWD /../../Libs/serial/build/libserial.a
0 commit comments