diff --git a/common.pri b/common.pri index 4c39a6a..bb087dd 100644 --- a/common.pri +++ b/common.pri @@ -32,24 +32,25 @@ CONFIG(easy_profiler) { message(EasyProfiler) INCLUDEPATH *= $$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 - greaterThan(QT_MAJOR_VERSION, 4) { + unix|win32: LIBS *= -L$$PWD/3rdparty/easyprofiler/build/bin/ -leasy_profiler + equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) { DEFINES *= BUILD_WITH_EASY_PROFILER } } !CONFIG(qtscriptengine) { - greaterThan(QT_MAJOR_VERSION, 4) { - greaterThan(QT_MINOR_VERSION, 5) { - CONFIG *= qjsengine - } - lessThan(QT_MINOR_VERSION, 6) { - CONFIG *= qtscriptengine - } - } - lessThan(QT_MAJOR_VERSION, 5) { + equals(QT_MAJOR_VERSION, 4) { 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 + } + equals(QT_MAJOR_VERSION, 6) { + CONFIG *= qjsengine + } } CONFIG(qtscriptengine) { @@ -74,12 +75,12 @@ CONFIG(zint) { DEFINES *= HAVE_ZINT } -greaterThan(QT_MAJOR_VERSION, 4) { - QT *= uitools +equals(QT_MAJOR_VERSION, 4) { + CONFIG *= uitools } -lessThan(QT_MAJOR_VERSION, 5) { - CONFIG *= uitools +equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) { + QT *= uitools } CONFIG(release, debug|release) { @@ -150,7 +151,15 @@ QT *= xml sql REPORT_PATH = $$PWD/limereport 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 QT *= printsupport widgets contains(QT, uitools) { @@ -163,11 +172,3 @@ greaterThan(QT_MAJOR_VERSION, 4) { QT *= qml } } - -lessThan(QT_MAJOR_VERSION, 5) { - DEFINES *= HAVE_QT4 - CONFIG(uitools) { - message(uitools) - DEFINES *= HAVE_UI_LOADER - } -} diff --git a/limereport.pro b/limereport.pro index 27dbc22..20fbfb5 100644 --- a/limereport.pro +++ b/limereport.pro @@ -14,7 +14,7 @@ SUBDIRS += \ demo_r2 \ 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 } diff --git a/limereport/dialogdesigner/dialogdesigner.pri b/limereport/dialogdesigner/dialogdesigner.pri index 7d2cef6..1ad5ba0 100644 --- a/limereport/dialogdesigner/dialogdesigner.pri +++ b/limereport/dialogdesigner/dialogdesigner.pri @@ -3,21 +3,23 @@ include($$PWD/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri) INCLUDEPATH *= $$PWD/3rdparty/designer -greaterThan(QT_MAJOR_VERSION, 4) : contains(QT, uitools) { - DEFINES += HAVE_QTDESIGNER_INTEGRATION +equals(QT_MAJOR_VERSION, 4) : CONFIG(uitools) { + DEFINES += HAVE_QTDESIGNER_INTEGRATION } -lessThan(QT_MAJOR_VERSION, 5) : CONFIG(uitools) { - DEFINES += HAVE_QTDESIGNER_INTEGRATION +if(equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6)) : contains(QT, uitools) { + DEFINES += HAVE_QTDESIGNER_INTEGRATION } -greaterThan(QT_MAJOR_VERSION, 4) { - QT *= designer designercomponents-private -} else { +equals(QT_MAJOR_VERSION, 4) { CONFIG *= designer qtAddLibrary(QtDesignerComponents) } +equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) { + QT *= designer designercomponents-private +} + SOURCES += $$PWD/lrdialogdesigner.cpp HEADERS += $$PWD/lrdialogdesigner.h