mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
升级宏定义
This commit is contained in:
parent
125c0eb42e
commit
3361694d43
@ -1 +1 @@
|
||||
Subproject commit d0a65e5f49433c1ca446c34926e7e169ef550362
|
||||
Subproject commit 5bfdec449f68119ed35f7bf26cdbf241764b7910
|
@ -41,6 +41,8 @@ CONFIG += build_all
|
||||
include ($${PWD}/../multi-link/add_base_manager.pri)
|
||||
|
||||
#根据multi-link提供的动态编译 静态编译设定进行编译,添加我自己的QQt的宏定义。
|
||||
#如果,用户把LibQQt编译为静态库,那么在链接的时候,需要QQT_STATIC_LIBRARY定义。
|
||||
#动态链接,一切默认即可。
|
||||
contains(DEFINES, LIB_LIBRARY) {
|
||||
DEFINES += QQT_LIBRARY
|
||||
message(Build $${TARGET} QQT_LIBRARY is defined. build)
|
||||
@ -91,6 +93,7 @@ include ($$PWD/qqt_source.pri)
|
||||
add_sdk(QQt, $$add_target_name())
|
||||
|
||||
#额外做点事情 拷贝头文件 没有后缀的头文件
|
||||
#这个可以通过Multi-link工具实现。
|
||||
add_sdk_header(QQt, $$add_target_name(), QQtApplication, frame)
|
||||
add_sdk_header(QQt, $$add_target_name(), QQtWidget, widgets)
|
||||
|
||||
|
@ -59,7 +59,7 @@ private:
|
||||
//不需要额外初始化的地方
|
||||
//mingw32 5.3 静态成员不准导出?作为静态类这块编译出现错误
|
||||
//error: definition of static data member 'QQtWavSoundEffect::msInstance' of dllimport'd class
|
||||
//这个已经查出来了,在qqt_header.pri有一个WIN64的鸿缺失,导致QQT_STATIC_LIBRARY缺失,引发QQt在QQTSHAREDEXPORT=import下编译,所以引发这个变量重新定义的错误,而报错是在导入的类里面定义了静态成员,也就是说导入类不准许静态成员的定义初始化代码出现,引入类的静态成员在自己的实现文件里出现了定义。变量重定义了。
|
||||
//这个已经查出来了,在qqt_header.pri有一个WIN64的宏缺失,导致QQT_STATIC_LIBRARY缺失,引发QQt在QQTSHAREDEXPORT=import下编译,所以引发这个变量重新定义的错误,而报错是在导入的类里面定义了静态成员,也就是说导入类不准许静态成员的定义初始化代码出现,引入类的静态成员在自己的实现文件里出现了定义。变量重定义了。
|
||||
static QQtWavSoundEffect* msInstance;
|
||||
|
||||
QQtWavAudioInput mWavInput;
|
||||
|
@ -178,7 +178,7 @@ public:
|
||||
* Get query mode.
|
||||
* \return query mode.
|
||||
*/
|
||||
inline QextSerialBase::QueryMode queryMode() const { return _queryMode; };
|
||||
inline QextSerialBase::QueryMode queryMode() const { return _queryMode; }
|
||||
|
||||
/*!
|
||||
* Set desired serial communication handling style. You may choose from polling
|
||||
|
@ -35,7 +35,7 @@ struct QextPortInfo
|
||||
* Windows implementation is based on Zach Gorman's work from
|
||||
* <a href="http://www.codeproject.com">The Code Project</a> (http://www.codeproject.com/system/setupdi.asp).
|
||||
*/
|
||||
class QextSerialEnumerator
|
||||
class LIBRARY_SHARED_EXPORT QextSerialEnumerator
|
||||
{
|
||||
private:
|
||||
#ifdef _TTY_WIN_
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define QextBaseType Win_QextSerialPort
|
||||
#endif
|
||||
|
||||
class QextSerialPort: public QextBaseType
|
||||
class LIBRARY_SHARED_EXPORT QextSerialPort: public QextBaseType
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -9,8 +9,6 @@ contains (DEFINES, __PLUGINSUPPORT__) {
|
||||
contains(QSYS_PRIVATE, Win32|Windows|Win64 || MSVC32|MSVC|MSVC64) {
|
||||
contains (DEFINES, QQT_LIBRARY) {
|
||||
DEFINES += BUILD_QDEVICEWATCHER_LIB
|
||||
} else: contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += BUILD_QDEVICEWATCHER_STATIC
|
||||
}
|
||||
wince*: SOURCES += $$PWD/pluginsupport/devicewatcher/qdevicewatcher_wince.cpp
|
||||
else: SOURCES += $$PWD/pluginsupport/devicewatcher/qdevicewatcher_win32.cpp
|
||||
@ -35,9 +33,6 @@ contains(DEFINES, __QQTCHARTS__) {
|
||||
win32 {
|
||||
contains (DEFINES, QQT_LIBRARY) {
|
||||
DEFINES += QCUSTOMPLOT_COMPILE_LIBRARY
|
||||
} else: contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
#build static library - qcustomplot
|
||||
DEFINES += QCUSTOMPLOT_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
SOURCES += $$PWD/charts/qcustomplot/qcpdocumentobject.cpp \
|
||||
@ -52,6 +47,12 @@ contains (DEFINES, __NETWORKSUPPORT__) {
|
||||
#if you use qextserialport, open the two annotation
|
||||
#注释:在qqt_header.pri打开 DEFINES += __QEXTSERIALPORT__
|
||||
contains (DEFINES, __QEXTSERIALPORT__) {
|
||||
win32 {
|
||||
contains (DEFINES, QQT_LIBRARY) {
|
||||
DEFINES += QEXTSERIALPORT_LIBRARY
|
||||
}
|
||||
}
|
||||
|
||||
#include ( $$PWD/network/qextserialport/qextserialport.pri )
|
||||
HEADERS += $$PWD/network/qextserialport/qextserialbase.h \
|
||||
$$PWD/network/qextserialport/qextserialport.h \
|
||||
@ -70,8 +71,6 @@ contains (DEFINES, __NETWORKSUPPORT__) {
|
||||
win32 {
|
||||
contains (DEFINES, QQT_LIBRARY) {
|
||||
DEFINES += QT_QTSOAP_LIBRARY
|
||||
} else: contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QT_QTSOAP_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
SOURCES += \
|
||||
@ -91,8 +90,6 @@ contains (DEFINES, __NETWORKSUPPORT__) {
|
||||
win32 {
|
||||
contains (DEFINES, QQT_LIBRARY) {
|
||||
DEFINES += QT_GUMBO_LIBRARY
|
||||
} else: contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QT_GUMBO_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
include ($$PWD/network/gumbo/parser/gumbo-parser.pri)
|
||||
@ -122,8 +119,6 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
#ignore: QZXing has no need to export
|
||||
contains (DEFINES, QQT_LIBRARY) {
|
||||
DEFINES += QZXING_LIBRARY
|
||||
} else: contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QZXING_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
include ($$PWD/exquisite/qrcode/qrdecode/qrdecode.pri)
|
||||
@ -142,8 +137,6 @@ contains (DEFINES, __EXQUISITE__) {
|
||||
#mathml
|
||||
contains (DEFINES, QQT_LIBRARY) {
|
||||
DEFINES += QT_QTMMLWIDGET_LIBRARY
|
||||
} else: contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QT_QTMMLWIDGET_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
SOURCES += $$PWD/exquisite/mathml/qtmmlwidget.cpp
|
||||
|
@ -84,13 +84,8 @@ defineTest(add_defines_QQt){
|
||||
}
|
||||
|
||||
#link and build all need this macro
|
||||
#现在Multi-link v2里面,已经有LIB_STATIC_LIBRARY,这个宏多余了,可是由于内部逻辑复杂,更改也不简单,所以留着了。用户静态编译LibQQt,记得定义QQT_STATIC_LIBRARY,build and link。
|
||||
contains(DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QCUSTOMPLOT_STATIC_LIBRARY
|
||||
DEFINES += QZXING_STATIC_LIBRARY
|
||||
DEFINES += QT_QTSOAP_STATIC_LIBRARY
|
||||
DEFINES += BUILD_QDEVICEWATCHER_STATIC
|
||||
DEFINES += QT_QTMMLWIDGET_STATIC_LIBRARY
|
||||
DEFINES += QT_GUMBO_STATIC_LIBRARY
|
||||
}
|
||||
|
||||
################################################################
|
||||
@ -141,6 +136,13 @@ defineTest(add_defines_QQt){
|
||||
contains(QSYS_PRIVATE, iOS||iOSSimulator||macOS) {
|
||||
DEFINES -= __PLUGINSUPPORT__
|
||||
}
|
||||
contains (DEFINES, __PLUGINSUPPORT__) {
|
||||
contains(QSYS_PRIVATE, Win32|Windows|Win64 || MSVC32|MSVC|MSVC64) {
|
||||
contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += BUILD_QDEVICEWATCHER_STATIC
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##################PrintSupport Module###############################
|
||||
#if you use printsupport , open this annotation
|
||||
@ -180,6 +182,14 @@ defineTest(add_defines_QQt){
|
||||
#in ios qcustomplot can't call savePdf now, no result but a log no printer error.
|
||||
#默认打开customplot
|
||||
DEFINES += __CUSTOMPLOT__
|
||||
contains (DEFINES, __CUSTOMPLOT__) {
|
||||
win32 {
|
||||
contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
#build static library - qcustomplot
|
||||
DEFINES += QCUSTOMPLOT_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##################QQtLogSystem Module###############################
|
||||
@ -250,6 +260,13 @@ defineTest(add_defines_QQt){
|
||||
##################WebService Module###############################
|
||||
#if you use Qt Service Support ( QtSoap ), open this annotation
|
||||
DEFINES += __WEBSERVICESUPPORT__
|
||||
contains (DEFINES, __WEBSERVICESUPPORT__) {
|
||||
win32 {
|
||||
contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QT_QTSOAP_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#One Ftp Http 单工...
|
||||
#Multi 半双工(客户端并发,服务器序列) QNetworkAccessManager
|
||||
@ -291,6 +308,11 @@ defineTest(add_defines_QQt){
|
||||
contains (DEFINES, __GUMBOSUPPORT__) {
|
||||
#Gumbo need std support, c99...
|
||||
QMAKE_CFLAGS += -std=c99
|
||||
win32 {
|
||||
contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QT_GUMBO_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -312,6 +334,12 @@ defineTest(add_defines_QQt){
|
||||
contains(DEFINES, __QRDECODE__) {
|
||||
#lessThan(QT_MAJOR_VERSION, 5): QT += declarative
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += quick
|
||||
contains(QSYS_PRIVATE, Win32|Windows|Win64 || MSVC32|MSVC|MSVC64) {
|
||||
#ignore: QZXing has no need to export
|
||||
contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QZXING_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if you use gif widgets, open this annotation
|
||||
@ -328,7 +356,13 @@ defineTest(add_defines_QQt){
|
||||
|
||||
##################Mathes Module###############################
|
||||
DEFINES += __MATHWIDGETSUPPORT__
|
||||
|
||||
contains (DEFINES, __SVGWIDGETS__) {
|
||||
contains(QSYS_PRIVATE, Win32|Windows|Win64 || MSVC32|MSVC|MSVC64) {
|
||||
contains (DEFINES, QQT_STATIC_LIBRARY) {
|
||||
DEFINES += QT_QTMMLWIDGET_STATIC_LIBRARY
|
||||
}
|
||||
}
|
||||
}
|
||||
#LOGIC CAMERA PREVIEW
|
||||
#depend on dmmu
|
||||
DEFINES += __LOGICCAMERAMODULE__
|
||||
|
Loading…
x
Reference in New Issue
Block a user