This commit is contained in:
2020-01-17 16:38:58 +08:00
parent ddf13fa7f1
commit 614b38342c
14 changed files with 81 additions and 5 deletions
+14 -1
View File
@@ -11,6 +11,10 @@ TEMPLATE = lib
DEFINES += SERIALPORT_LIBRARY
CONFIG += resources_big
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
@@ -32,7 +36,8 @@ FORMS += \
HEADERS += \
$$PWD/connectdialog.h \
$$PWD/disconnectdialog.h
$$PWD/disconnectdialog.h \
serialportlib.h
SOURCES += \
$$PWD/connectdialog.cpp \
@@ -58,4 +63,12 @@ win32 {
system(xcopy $$src_dir $$dst_dir /y /e)
}
unix {
src_dir = $$PWD/*.h
dst_dir = $$PWD/../thirdpart/include/
!exists($$dst_dir): system(mkdir -p $$dst_dir)
system(cp $$src_dir $$dst_dir -arf )
}
+5
View File
@@ -8,11 +8,16 @@
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QSettings>
#include "serialportlib.h"
namespace Ui {
class ConnectDialog;
}
class ConnectDialog : public QDialog
{
Q_OBJECT
+4
View File
@@ -2,11 +2,15 @@
#define DISCONNECTDIALOG_H
#include <QDialog>
#include "serialportlib.h"
namespace Ui {
class disconnectdialog;
}
class disconnectdialog : public QDialog
{
Q_OBJECT
+20
View File
@@ -0,0 +1,20 @@
#ifndef SERIALPORTLIB_H
#define SERIALPORTLIB_H
//这一句用于输出lib exp文件
#ifdef QtSerialPort
#if defined(SERIALPORT_LIBRARY)
# define SHARED_EXPORT Q_DECL_EXPORT
#else
# define SHARED_EXPORT Q_DECL_IMPORT
#endif
#endif
#endif // SERIALPORTLIB_H