qt_demoe/third/3rd_qcustomplot/3rd_qcustomplot.pri

41 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-12-08 09:44:30 +00:00
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
2021-12-10 12:23:28 +00:00
greaterThan(QT_MAJOR_VERSION, 4): CONFIG += c++11
#lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
2021-12-08 09:44:30 +00:00
2022-04-27 01:24:14 +00:00
#没有定义任何版本则默认采用2.0
2021-12-10 12:23:28 +00:00
!contains(DEFINES, qcustomplot_v1_3) {
!contains(DEFINES, qcustomplot_v2_0) {
!contains(DEFINES, qcustomplot_v2_1) {
DEFINES += qcustomplot_v2_0
}}}
2022-04-27 01:24:14 +00:00
#定义了2.0版本在Qt5以上采用2.1
contains(DEFINES, qcustomplot_v2_0) {
2021-12-10 12:23:28 +00:00
!contains(DEFINES, qcustomplot_v2_1) {
greaterThan(QT_MAJOR_VERSION, 4) {
DEFINES -= qcustomplot_v1_3
DEFINES -= qcustomplot_v2_0
2021-12-10 12:23:28 +00:00
DEFINES += qcustomplot_v2_1
2022-04-27 01:24:14 +00:00
}}}
2021-12-10 12:23:28 +00:00
2022-04-27 01:24:14 +00:00
#根据定义的版本引入文件
2021-12-10 12:23:28 +00:00
contains(DEFINES, qcustomplot_v1_3) {
INCLUDEPATH += $$PWD/v1_3
HEADERS += $$PWD/v1_3/qcustomplot.h
SOURCES += $$PWD/v1_3/qcustomplot.cpp
} else {
contains(DEFINES, qcustomplot_v2_0) {
INCLUDEPATH += $$PWD/v2_0
HEADERS += $$PWD/v2_0/qcustomplot.h
SOURCES += $$PWD/v2_0/qcustomplot.cpp
} else {
INCLUDEPATH += $$PWD/v2_1
2022-04-27 01:24:14 +00:00
#引入对应修复不支持Qt6的头文件
2021-12-10 12:23:28 +00:00
greaterThan(QT_MAJOR_VERSION, 5) {
HEADERS += $$PWD/v2_1_6/qcustomplot.h
} else {
HEADERS += $$PWD/v2_1/qcustomplot.h
}
SOURCES += $$PWD/v2_1/qcustomplot.cpp
}}