b
This commit is contained in:
@@ -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 )
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,16 @@
|
||||
#include <QSerialPort>
|
||||
#include <QSerialPortInfo>
|
||||
#include <QSettings>
|
||||
#include "serialportlib.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class ConnectDialog;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class ConnectDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -2,11 +2,15 @@
|
||||
#define DISCONNECTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "serialportlib.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class disconnectdialog;
|
||||
}
|
||||
|
||||
|
||||
|
||||
class disconnectdialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user