0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 08:34:38 +03:00

Properly detect Qt 6

It doesn't compile yet on Qt 6 but I'm working on it.
This commit is contained in:
Rodrigo Torres 2021-08-20 13:50:06 -03:00
parent b9a3b3cce4
commit 53683a8c89
3 changed files with 35 additions and 32 deletions

View File

@ -33,22 +33,23 @@ CONFIG(easy_profiler) {
INCLUDEPATH *= $$PWD/3rdparty/easyprofiler/easy_profiler_core/include INCLUDEPATH *= $$PWD/3rdparty/easyprofiler/easy_profiler_core/include
DEPENDPATH *= $$PWD/3rdparty/easyprofiler/easy_profiler_core/include DEPENDPATH *= $$PWD/3rdparty/easyprofiler/easy_profiler_core/include
unix|win32: LIBS *= -L$$PWD/3rdparty/easyprofiler/build/bin/ -leasy_profiler unix|win32: LIBS *= -L$$PWD/3rdparty/easyprofiler/build/bin/ -leasy_profiler
greaterThan(QT_MAJOR_VERSION, 4) { equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
DEFINES *= BUILD_WITH_EASY_PROFILER DEFINES *= BUILD_WITH_EASY_PROFILER
} }
} }
!CONFIG(qtscriptengine) { !CONFIG(qtscriptengine) {
greaterThan(QT_MAJOR_VERSION, 4) { equals(QT_MAJOR_VERSION, 4) {
greaterThan(QT_MINOR_VERSION, 5) { CONFIG *= qtscriptengine
}
equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 6) {
CONFIG *= qtscriptengine
}
equals(QT_MAJOR_VERSION, 5) : greaterThan(QT_MINOR_VERSION, 5) {
CONFIG *= qjsengine CONFIG *= qjsengine
} }
lessThan(QT_MINOR_VERSION, 6) { equals(QT_MAJOR_VERSION, 6) {
CONFIG *= qtscriptengine CONFIG *= qjsengine
}
}
lessThan(QT_MAJOR_VERSION, 5) {
CONFIG *= qtscriptengine
} }
} }
@ -74,12 +75,12 @@ CONFIG(zint) {
DEFINES *= HAVE_ZINT DEFINES *= HAVE_ZINT
} }
greaterThan(QT_MAJOR_VERSION, 4) { equals(QT_MAJOR_VERSION, 4) {
QT *= uitools CONFIG *= uitools
} }
lessThan(QT_MAJOR_VERSION, 5) { equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
CONFIG *= uitools QT *= uitools
} }
CONFIG(release, debug|release) { CONFIG(release, debug|release) {
@ -150,7 +151,15 @@ QT *= xml sql
REPORT_PATH = $$PWD/limereport REPORT_PATH = $$PWD/limereport
TRANSLATIONS_PATH = $$PWD/translations TRANSLATIONS_PATH = $$PWD/translations
greaterThan(QT_MAJOR_VERSION, 4) { equals(QT_MAJOR_VERSION, 4) {
DEFINES *= HAVE_QT4
CONFIG(uitools) {
message(uitools)
DEFINES *= HAVE_UI_LOADER
}
}
equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
DEFINES *= HAVE_QT5 DEFINES *= HAVE_QT5
QT *= printsupport widgets QT *= printsupport widgets
contains(QT, uitools) { contains(QT, uitools) {
@ -163,11 +172,3 @@ greaterThan(QT_MAJOR_VERSION, 4) {
QT *= qml QT *= qml
} }
} }
lessThan(QT_MAJOR_VERSION, 5) {
DEFINES *= HAVE_QT4
CONFIG(uitools) {
message(uitools)
DEFINES *= HAVE_UI_LOADER
}
}

View File

@ -14,7 +14,7 @@ SUBDIRS += \
demo_r2 \ demo_r2 \
designer designer
greaterThan(QT_MAJOR_VERSION, 4) : greaterThan(QT_MINOR_VERSION, 1) { if(equals(QT_MAJOR_VERSION, 5) : greaterThan(QT_MINOR_VERSION, 1)) | equals(QT_MAJOR_VERSION, 6) {
SUBDIRS += console SUBDIRS += console
} }

View File

@ -3,21 +3,23 @@ include($$PWD/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri)
INCLUDEPATH *= $$PWD/3rdparty/designer INCLUDEPATH *= $$PWD/3rdparty/designer
greaterThan(QT_MAJOR_VERSION, 4) : contains(QT, uitools) { equals(QT_MAJOR_VERSION, 4) : CONFIG(uitools) {
DEFINES += HAVE_QTDESIGNER_INTEGRATION DEFINES += HAVE_QTDESIGNER_INTEGRATION
} }
lessThan(QT_MAJOR_VERSION, 5) : CONFIG(uitools) { if(equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6)) : contains(QT, uitools) {
DEFINES += HAVE_QTDESIGNER_INTEGRATION DEFINES += HAVE_QTDESIGNER_INTEGRATION
} }
greaterThan(QT_MAJOR_VERSION, 4) { equals(QT_MAJOR_VERSION, 4) {
QT *= designer designercomponents-private
} else {
CONFIG *= designer CONFIG *= designer
qtAddLibrary(QtDesignerComponents) qtAddLibrary(QtDesignerComponents)
} }
equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
QT *= designer designercomponents-private
}
SOURCES += $$PWD/lrdialogdesigner.cpp SOURCES += $$PWD/lrdialogdesigner.cpp
HEADERS += $$PWD/lrdialogdesigner.h HEADERS += $$PWD/lrdialogdesigner.h