From e96e1a9adc15b3ca99f3181b3c1cbd1c2d63f0d9 Mon Sep 17 00:00:00 2001 From: Rodrigo Torres Date: Wed, 18 Aug 2021 14:14:37 -0300 Subject: [PATCH] Simplify .pro/.pri --- 3rdparty/zint-2.6.1/backend_qt/backend_qt.pro | 54 ++++----- common.pri | 112 ++++++++++-------- console/console.pro | 15 ++- demo_r1/demo_r1.pro | 60 +++++----- demo_r2/demo_r2.pro | 50 ++++---- designer/designer.pro | 27 ++--- designer_plugin/designer_plugin.pro | 30 ++--- limereport.pro | 24 ++-- limereport/designer.pri | 11 +- .../designerintegration.pri | 12 +- limereport/dialogdesigner/dialogdesigner.pri | 18 ++- limereport/limereport.pri | 18 ++- limereport/limereport.pro | 44 ++++--- 13 files changed, 235 insertions(+), 240 deletions(-) diff --git a/3rdparty/zint-2.6.1/backend_qt/backend_qt.pro b/3rdparty/zint-2.6.1/backend_qt/backend_qt.pro index 13e5114..a1cd0ba 100644 --- a/3rdparty/zint-2.6.1/backend_qt/backend_qt.pro +++ b/3rdparty/zint-2.6.1/backend_qt/backend_qt.pro @@ -1,13 +1,13 @@ DEFINES += NO_PNG TEMPLATE = lib -contains(CONFIG, static_build){ +CONFIG(static_build) { message(Static Build) CONFIG += staticlib DEFINES += QZINT_STATIC_BUILD } -!contains(CONFIG, staticlib){ +!CONFIG(staticlib) { CONFIG += dll DEFINES += QZINT_LIBRARY } @@ -27,10 +27,10 @@ INCLUDEPATH += $$PWD/../backend DEFINES += ZINT_VERSION=\\\"$$ZINT_VERSION\\\" -CONFIG(release, debug|release){ - TARGET = QtZint +CONFIG(release, debug|release) { + TARGET = QtZint } else { - TARGET = QtZintd + TARGET = QtZintd } !contains(DEFINES, NO_PNG) { @@ -40,28 +40,28 @@ CONFIG(release, debug|release){ INCLUDEPATH += zint zint/backend zint/backend_qt -HEADERS += $$PWD/../backend/aztec.h \ - $$PWD/../backend/bmp.h \ - $$PWD/../backend/code49.h \ - $$PWD/../backend/common.h \ - $$PWD/../backend/composite.h \ - $$PWD/../backend/dmatrix.h \ - $$PWD/../backend/eci.h \ - $$PWD/../backend/font.h \ - $$PWD/../backend/gridmtx.h \ - $$PWD/../backend/gs1.h \ - $$PWD/../backend/hanxin.h \ - $$PWD/../backend/large.h \ - $$PWD/../backend/maxicode.h \ - $$PWD/../backend/pcx.h \ - $$PWD/../backend/pdf417.h \ - $$PWD/../backend/reedsol.h \ - $$PWD/../backend/rss.h \ - $$PWD/../backend/sjis.h \ - $$PWD/../backend/stdint_msvc.h \ - $$PWD/../backend/zint.h \ - $$PWD/qzint.h \ - $$PWD/qzint_global.h +HEADERS += $$PWD/../backend/aztec.h \ + $$PWD/../backend/bmp.h \ + $$PWD/../backend/code49.h \ + $$PWD/../backend/common.h \ + $$PWD/../backend/composite.h \ + $$PWD/../backend/dmatrix.h \ + $$PWD/../backend/eci.h \ + $$PWD/../backend/font.h \ + $$PWD/../backend/gridmtx.h \ + $$PWD/../backend/gs1.h \ + $$PWD/../backend/hanxin.h \ + $$PWD/../backend/large.h \ + $$PWD/../backend/maxicode.h \ + $$PWD/../backend/pcx.h \ + $$PWD/../backend/pdf417.h \ + $$PWD/../backend/reedsol.h \ + $$PWD/../backend/rss.h \ + $$PWD/../backend/sjis.h \ + $$PWD/../backend/stdint_msvc.h \ + $$PWD/../backend/zint.h \ + $$PWD/qzint.h \ + $$PWD/qzint_global.h SOURCES += $$PWD/../backend/2of5.c \ $$PWD/../backend/auspost.c \ diff --git a/common.pri b/common.pri index 71b4253..4c39a6a 100644 --- a/common.pri +++ b/common.pri @@ -1,66 +1,76 @@ +# uncomment to disable translations +#CONFIG += no_build_translations + +# uncomment to disable zint +#CONFIG += no_zint + +# uncomment to disable svg +#CONFIG += no_svg + +# uncomment to enable easy_profiler +#CONFIG *= easy_profiler + isEmpty(BINARY_RESULT_DIR) { BINARY_RESULT_DIR = $${PWD} } -!contains(CONFIG, no_build_translations){ - CONFIG += build_translations +!CONFIG(no_build_translations) { + CONFIG *= build_translations } -#CONFIG *= easy_profiler -!contains(CONFIG, no_zint){ +!CONFIG(no_zint) { CONFIG *= zint } -!contains(CONFIG, no_svg) { +!CONFIG(no_svg) { QT *= svg CONFIG *= svg - DEFINES += HAVE_SVG + DEFINES *= HAVE_SVG } -INCLUDEPATH += $$PWD/3rdparty/easyprofiler/easy_profiler_core/include -DEPENDPATH += $$PWD/3rdparty/easyprofiler/easy_profiler_core/include - -contains(CONFIG, easy_profiler){ +CONFIG(easy_profiler) { message(EasyProfiler) - unix|win32: LIBS += -L$$PWD/3rdparty/easyprofiler/build/bin/ -leasy_profiler - greaterThan(QT_MAJOR_VERSION, 4){ - DEFINES += BUILD_WITH_EASY_PROFILER + 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) { + DEFINES *= BUILD_WITH_EASY_PROFILER } } -!contains(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){ - CONFIG *= qtscriptengine -} +!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) { + CONFIG *= qtscriptengine + } } -contains(CONFIG, qtscriptengine){ +CONFIG(qtscriptengine) { CONFIG -= qjsengine QT *= script DEFINES *= USE_QTSCRIPTENGINE message(qtscriptengine) } -!contains(CONFIG, no_formdesigner){ +!CONFIG(no_formdesigner) { CONFIG *= dialogdesigner } -!contains(CONFIG, no_embedded_designer){ +!CONFIG(no_embedded_designer) { CONFIG *= embedded_designer - DEFINES += HAVE_REPORT_DESIGNER + DEFINES *= HAVE_REPORT_DESIGNER message(embedded designer) } ZINT_PATH = $$PWD/3rdparty/zint-2.6.1 -contains(CONFIG,zint){ +CONFIG(zint) { DEFINES *= HAVE_ZINT } @@ -68,11 +78,11 @@ greaterThan(QT_MAJOR_VERSION, 4) { QT *= uitools } -lessThan(QT_MAJOR_VERSION, 5){ +lessThan(QT_MAJOR_VERSION, 5) { CONFIG *= uitools } -CONFIG(release, debug|release){ +CONFIG(release, debug|release) { message(Release) BUILD_TYPE = release }else{ @@ -83,39 +93,43 @@ CONFIG(release, debug|release){ BUILD_DIR = $${BINARY_RESULT_DIR}/build/$${QT_VERSION} DEST_INCLUDE_DIR = $$PWD/include + unix{ ARCH_DIR = $${OUT_PWD}/unix ARCH_TYPE = unix + macx{ - ARCH_DIR = $${OUT_PWD}/macx - ARCH_TYPE = macx + ARCH_DIR = $${OUT_PWD}/macx + ARCH_TYPE = macx } + linux{ - !contains(QT_ARCH, x86_64){ + !contains(QT_ARCH, x86_64) { message("Compiling for 32bit system") - ARCH_DIR = $${OUT_PWD}/linux32 - ARCH_TYPE = linux32 + ARCH_DIR = $${OUT_PWD}/linux32 + ARCH_TYPE = linux32 }else{ message("Compiling for 64bit system") - ARCH_DIR = $${OUT_PWD}/linux64 - ARCH_TYPE = linux64 + ARCH_DIR = $${OUT_PWD}/linux64 + ARCH_TYPE = linux64 } } } + win32 { !contains(QT_ARCH, x86_64) { message("Compiling for 32bit system") - ARCH_DIR = $${OUT_PWD}/win32 - ARCH_TYPE = win32 + ARCH_DIR = $${OUT_PWD}/win32 + ARCH_TYPE = win32 } else { message("Compiling for 64bit system") - ARCH_DIR = $${OUT_PWD}/win64 - ARCH_TYPE = win64 + ARCH_DIR = $${OUT_PWD}/win64 + ARCH_TYPE = win64 } } -DEST_LIBS = $${BUILD_DIR}/$${ARCH_TYPE}/$${BUILD_TYPE}/lib -DEST_BINS = $${BUILD_DIR}/$${ARCH_TYPE}/$${BUILD_TYPE}/$${TARGET} +DEST_LIBS = $${BUILD_DIR}/$${ARCH_TYPE}/$${BUILD_TYPE}/lib +DEST_BINS = $${BUILD_DIR}/$${ARCH_TYPE}/$${BUILD_TYPE}/$${TARGET} MOC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/moc UI_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/ui @@ -139,20 +153,20 @@ TRANSLATIONS_PATH = $$PWD/translations greaterThan(QT_MAJOR_VERSION, 4) { DEFINES *= HAVE_QT5 QT *= printsupport widgets - contains(QT,uitools){ + contains(QT, uitools) { message(uitools) DEFINES *= HAVE_UI_LOADER } - contains(CONFIG, qjsengine){ + CONFIG(qjsengine) { message(qjsengine) DEFINES *= USE_QJSENGINE QT *= qml } } -lessThan(QT_MAJOR_VERSION, 5){ +lessThan(QT_MAJOR_VERSION, 5) { DEFINES *= HAVE_QT4 - CONFIG(uitools){ + CONFIG(uitools) { message(uitools) DEFINES *= HAVE_UI_LOADER } diff --git a/console/console.pro b/console/console.pro index cea280f..f12bc2d 100644 --- a/console/console.pro +++ b/console/console.pro @@ -23,13 +23,12 @@ CONFIG(debug, debug|release) { } else { LIBS += -llimereport } -!contains(CONFIG, static_build){ - contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -lQtZintd - } else { - LIBS += -lQtZint - } + +!CONFIG(static_build) : CONFIG(zint) { + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint } } diff --git a/demo_r1/demo_r1.pro b/demo_r1/demo_r1.pro index 36505d3..8b4266c 100644 --- a/demo_r1/demo_r1.pro +++ b/demo_r1/demo_r1.pro @@ -2,56 +2,56 @@ include(../common.pri) QT += core gui CONFIG(release, debug|release) { - TARGET = LRDemo_r1 + TARGET = LRDemo_r1 } else { - TARGET = LRDemo_r1d + TARGET = LRDemo_r1d } TEMPLATE = app -SOURCES += main.cpp\ - mainwindow.cpp +SOURCES += main.cpp \ + mainwindow.cpp -HEADERS += mainwindow.h +HEADERS += mainwindow.h -FORMS += mainwindow.ui +FORMS += mainwindow.ui INCLUDEPATH += $$PWD/../include DEPENDPATH += $$PWD/../include RESOURCES += \ - r1.qrc + r1.qrc EXTRA_DIR += $$PWD/demo_reports DEST_DIR = $${DEST_BINS} REPORTS_DIR = $${DEST_DIR} macx{ - CONFIG += app_bundle + CONFIG += app_bundle } unix:{ - DESTDIR = $$DEST_DIR - # QMAKE_POST_LINK += mkdir -p $$quote($$REPORTS_DIR) | - QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) + DESTDIR = $$DEST_DIR + # QMAKE_POST_LINK += mkdir -p $$quote($$REPORTS_DIR) | + QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) - linux{ - #Link share lib to ../lib rpath - QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN - QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib - QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/../lib - QMAKE_LFLAGS_RPATH += #. .. ./libs - } - target.path = $${DEST_DIR} - INSTALLS = target + linux{ + #Link share lib to ../lib rpath + QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN + QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib + QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/../lib + QMAKE_LFLAGS_RPATH += #. .. ./libs + } + target.path = $${DEST_DIR} + INSTALLS = target } win32 { DESTDIR = $$DEST_DIR - contains(QMAKE_HOST.os, Linux){ + contains(QMAKE_HOST.os, Linux) { QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) } else { - EXTRA_DIR ~= s,/,\\,g + EXTRA_DIR ~= s,/,\\,g DEST_DIR ~= s,/,\\,g REPORTS_DIR ~= s,/,\\,g RC_FILE += mainicon.rc @@ -67,13 +67,11 @@ CONFIG(debug, debug|release) { } message($$LIBS) -!contains(CONFIG, static_build){ - contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -lQtZintd - } else { - LIBS += -lQtZint - } - } +!CONFIG(static_build) : CONFIG(zint) { + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } } diff --git a/demo_r2/demo_r2.pro b/demo_r2/demo_r2.pro index c8abe1f..1a77367 100644 --- a/demo_r2/demo_r2.pro +++ b/demo_r2/demo_r2.pro @@ -1,16 +1,16 @@ include(../common.pri) QT += core gui -CONFIG(release, debug|release){ - TARGET = LRDemo_r2 +CONFIG(release, debug|release) { + TARGET = LRDemo_r2 } else { - TARGET = LRDemo_r2d + TARGET = LRDemo_r2d } TEMPLATE = app -SOURCES += main.cpp\ - mainwindow.cpp +SOURCES += main.cpp \ + mainwindow.cpp HEADERS += mainwindow.h @@ -20,7 +20,7 @@ INCLUDEPATH += $$PWD/../include DEPENDPATH += $$PWD/../include RESOURCES += \ - demo_r2.qrc + demo_r2.qrc EXTRA_DIR += $$PWD/demo_reports @@ -34,26 +34,26 @@ macx{ unix:{ DESTDIR = $$DEST_DIR QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) - linux{ - #Link share lib to ../lib rpath - QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN - QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib - QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/../lib - QMAKE_LFLAGS_RPATH += #. .. ./libs - } + linux{ + #Link share lib to ../lib rpath + QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN + QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib + QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/../lib + QMAKE_LFLAGS_RPATH += #. .. ./libs + } target.path = $${DEST_DIR} INSTALLS = target } win32 { DESTDIR = $$DEST_DIR - contains(QMAKE_HOST.os, Linux){ + contains(QMAKE_HOST.os, Linux) { QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\" $$escape_expand(\n\t) } else { - EXTRA_DIR ~= s,/,\\,g + EXTRA_DIR ~= s,/,\\,g DEST_DIR ~= s,/,\\,g - REPORTS_DIR ~= s,/,\\,g - RC_FILE += mainicon.rc + REPORTS_DIR ~= s,/,\\,g + RC_FILE += mainicon.rc QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t) } } @@ -65,13 +65,11 @@ CONFIG(debug, debug|release) { LIBS += -llimereport } -!contains(CONFIG, static_build){ - contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -lQtZintd - } else { - LIBS += -lQtZint - } - } +!CONFIG(static_build) : CONFIG(zint) { + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } } diff --git a/designer/designer.pro b/designer/designer.pro index 3f9cb8e..318f29a 100644 --- a/designer/designer.pro +++ b/designer/designer.pro @@ -1,18 +1,19 @@ include(../common.pri) QT += core gui -contains(CONFIG,release) { - TARGET = LRDesigner +CONFIG(release) { + TARGET = LRDesigner } else { - TARGET = LRDesignerd + TARGET = LRDesignerd } + TEMPLATE = app HEADERS += \ - designersettingmanager.h + designersettingmanager.h SOURCES += main.cpp \ - designersettingmanager.cpp + designersettingmanager.cpp INCLUDEPATH += $$PWD/../include DEPENDPATH += $$PWD/../include @@ -51,17 +52,15 @@ win32 { LIBS += -L$${DEST_LIBS} CONFIG(debug, debug|release) { - LIBS += -llimereportd + LIBS += -llimereportd } else { - LIBS += -llimereport + LIBS += -llimereport } -!contains(CONFIG, static_build){ - contains(CONFIG,zint){ - CONFIG(debug, debug|release) { - LIBS += -L$${DEST_LIBS} -lQtZintd - } else { - LIBS += -L$${DEST_LIBS} -lQtZint - } +!CONFIG(static_build) : CONFIG(zint) { + CONFIG(debug, debug|release) { + LIBS += -L$${DEST_LIBS} -lQtZintd + } else { + LIBS += -L$${DEST_LIBS} -lQtZint } } diff --git a/designer_plugin/designer_plugin.pro b/designer_plugin/designer_plugin.pro index 219a796..e610298 100644 --- a/designer_plugin/designer_plugin.pro +++ b/designer_plugin/designer_plugin.pro @@ -4,43 +4,43 @@ include(../common.pri) include(../limereport/limereport.pri) include(../limereport/designer.pri) -contains(CONFIG,release) { - TARGET = designer_plugin +CONFIG(release) { + TARGET = designer_plugin } else { - TARGET = designer_plugind + TARGET = designer_plugind } TEMPLATE = lib CONFIG += plugin HEADERS += \ - lrdesignerplugin.h + lrdesignerplugin.h SOURCES += \ - lrdesignerplugin.cpp + lrdesignerplugin.cpp INCLUDEPATH += $$PWD/../include DEPENDPATH += $$PWD/../include macx{ - CONFIG += lib_bundle - CONFIG += -dll + CONFIG += lib_bundle + CONFIG += -dll } -DESTDIR = $${DEST_LIBS} +DESTDIR = $${DEST_LIBS} unix { target.path = $${DESTDIR} INSTALLS = target } -contains(CONFIG,zint){ +CONFIG(zint) { message(zint) INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release){ - LIBS += -lQtZintd - } else { - LIBS += -lQtZint - } + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } } diff --git a/limereport.pro b/limereport.pro index 9bc801f..27dbc22 100644 --- a/limereport.pro +++ b/limereport.pro @@ -1,31 +1,23 @@ TEMPLATE = subdirs -!contains(CONFIG, no_zint){ - CONFIG += zint -} - include(common.pri) -contains(CONFIG, zint){ + +CONFIG += ordered + +CONFIG(zint) { SUBDIRS += 3rdparty } -export($$CONFIG) - -CONFIG += ordered SUBDIRS += \ limereport \ demo_r1 \ demo_r2 \ designer -greaterThan(QT_MAJOR_VERSION, 4){ -greaterThan(QT_MINOR_VERSION, 1){ - SUBDIRS += console - } +greaterThan(QT_MAJOR_VERSION, 4) : greaterThan(QT_MINOR_VERSION, 1) { + SUBDIRS += console } -!contains(CONFIG, embedded_designer){ -!contains(CONFIG, static_build){ -SUBDIRS += designer_plugin -} +!CONFIG(embedded_designer) : !CONFIG(static_build) { + SUBDIRS += designer_plugin } diff --git a/limereport/designer.pri b/limereport/designer.pri index 72bd275..13bf6ea 100644 --- a/limereport/designer.pri +++ b/limereport/designer.pri @@ -1,8 +1,9 @@ include(../common.pri) -DEFINES+=HAVE_REPORT_DESIGNER -contains(CONFIG,dialogdesigner){ - include($$REPORT_PATH/dialogdesigner/dialogdesigner.pri) +DEFINES += HAVE_REPORT_DESIGNER + +CONFIG(dialogdesigner) { + include($$REPORT_PATH/dialogdesigner/dialogdesigner.pri) } INCLUDEPATH += $$REPORT_PATH/objectinspector \ @@ -51,7 +52,7 @@ SOURCES += \ $$REPORT_PATH/lrreportdesignwidget.cpp \ $$REPORT_PATH/lrreportdesignwindow.cpp -contains(CONFIG, svg){ +CONFIG(svg) { SOURCES += \ $$REPORT_PATH/objectinspector/editors/lrsvgeditor.cpp \ $$REPORT_PATH/objectinspector/propertyItems/lrsvgpropitem.cpp @@ -100,7 +101,7 @@ HEADERS += \ $$REPORT_PATH/lrreportdesignwidget.h \ $$REPORT_PATH/lrreportdesignwindow.h -contains(CONFIG, svg){ +contains(CONFIG, svg) { HEADERS += \ $$REPORT_PATH/objectinspector/editors/lrsvgeditor.h \ $$REPORT_PATH/objectinspector/propertyItems/lrsvgpropitem.h diff --git a/limereport/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri b/limereport/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri index f3a02f6..e86cac8 100644 --- a/limereport/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri +++ b/limereport/dialogdesigner/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri @@ -1,11 +1,11 @@ INCLUDEPATH *= $$PWD $$PWD/.. SOURCES += $$PWD/widgethost.cpp \ - $$PWD/sizehandlerect.cpp \ - $$PWD/formresizer.cpp + $$PWD/sizehandlerect.cpp \ + $$PWD/formresizer.cpp HEADERS += $$PWD/widgethost.h \ - $$PWD/sizehandlerect.h \ - $$PWD/formresizer.h \ - $$PWD/widgethostconstants.h \ - $$PWD/../namespace_global.h + $$PWD/sizehandlerect.h \ + $$PWD/formresizer.h \ + $$PWD/widgethostconstants.h \ + $$PWD/../namespace_global.h diff --git a/limereport/dialogdesigner/dialogdesigner.pri b/limereport/dialogdesigner/dialogdesigner.pri index 960b7c3..7d2cef6 100644 --- a/limereport/dialogdesigner/dialogdesigner.pri +++ b/limereport/dialogdesigner/dialogdesigner.pri @@ -1,27 +1,25 @@ include(../../common.pri) include($$PWD/3rdparty/qtcreator/designerintegrationv2/designerintegration.pri) + INCLUDEPATH *= $$PWD/3rdparty/designer -greaterThan(QT_MAJOR_VERSION, 4) { - contains(QT,uitools){ + +greaterThan(QT_MAJOR_VERSION, 4) : contains(QT, uitools) { DEFINES += HAVE_QTDESIGNER_INTEGRATION - } } -lessThan(QT_MAJOR_VERSION, 5){ - contains(CONFIG,uitools){ + +lessThan(QT_MAJOR_VERSION, 5) : CONFIG(uitools) { DEFINES += HAVE_QTDESIGNER_INTEGRATION - } } greaterThan(QT_MAJOR_VERSION, 4) { QT *= designer designercomponents-private - } else { - CONFIG *= designer - qtAddLibrary( QtDesignerComponents ) + CONFIG *= designer + qtAddLibrary(QtDesignerComponents) } SOURCES += $$PWD/lrdialogdesigner.cpp HEADERS += $$PWD/lrdialogdesigner.h RESOURCES += \ - $$PWD/dialogdesigner.qrc + $$PWD/dialogdesigner.qrc diff --git a/limereport/limereport.pri b/limereport/limereport.pri index 83879ba..c014955 100644 --- a/limereport/limereport.pri +++ b/limereport/limereport.pri @@ -1,6 +1,6 @@ include(../common.pri) -contains(CONFIG, embedded_designer){ +contains(CONFIG, embedded_designer) { include(designer.pri) message(embedded designer) } @@ -76,17 +76,16 @@ SOURCES += \ $$REPORT_PATH/exporters/lrpdfexporter.cpp \ $$REPORT_PATH/lrpreparedpages.cpp - -contains(CONFIG, staticlib){ +CONFIG(staticlib) { SOURCES += $$REPORT_PATH/lrfactoryinitializer.cpp } -contains(CONFIG, zint){ +CONFIG(zint) { SOURCES += $$REPORT_PATH/items/lrbarcodeitem.cpp } -contains(CONFIG, svg){ - SOURCES += $$REPORT_PATH/items/lrsvgitem.cpp \ +CONFIG(svg) { + SOURCES += $$REPORT_PATH/items/lrsvgitem.cpp \ } HEADERS += \ @@ -171,15 +170,15 @@ HEADERS += \ $$REPORT_PATH/lrpreparedpages.h \ $$REPORT_PATH/lrpreparedpagesintf.h -contains(CONFIG, staticlib){ +CONFIG(staticlib) { HEADERS += $$REPORT_PATH/lrfactoryinitializer.h } -contains(CONFIG,zint){ +CONFIG(zint) { HEADERS += $$REPORT_PATH/items/lrbarcodeitem.h } -contains(CONFIG, svg){ +CONFIG(svg) { HEADERS += $$REPORT_PATH/items/lrsvgitem.h } @@ -196,4 +195,3 @@ FORMS += \ RESOURCES += \ $$REPORT_PATH/report.qrc \ $$REPORT_PATH/items/items.qrc - diff --git a/limereport/limereport.pro b/limereport/limereport.pro index c6f8c89..1389ae2 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -1,4 +1,4 @@ -CONFIG(debug, debug|release){ +CONFIG(debug, debug|release) { TARGET = limereportd } else { TARGET = limereport @@ -6,11 +6,11 @@ CONFIG(debug, debug|release){ TEMPLATE = lib -contains(CONFIG, static_build){ +CONFIG(static_build) { CONFIG += staticlib } -!contains(CONFIG, staticlib){ +!CONFIG(staticlib) { CONFIG += lib CONFIG += dll } @@ -19,14 +19,14 @@ CONFIG += create_prl CONFIG += link_prl macx{ - CONFIG -= dll - CONFIG += lib_bundle - CONFIG += plugin + CONFIG -= dll + CONFIG += lib_bundle + CONFIG += plugin } DEFINES += LIMEREPORT_EXPORTS -contains(CONFIG, staticlib){ +CONFIG(staticlib) { DEFINES += HAVE_STATIC_BUILD DEFINES += QZINT_STATIC_BUILD message(STATIC_BUILD) @@ -47,15 +47,15 @@ EXTRA_FILES += \ include(limereport.pri) unix:{ - DESTDIR = $${DEST_LIBS} + DESTDIR = $${DEST_LIBS} linux{ QMAKE_POST_LINK += mkdir -p \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ - for(FILE,EXTRA_FILES){ + for(FILE,EXTRA_FILES) { QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # inside of libs make /include/files } } macx{ - for(FILE,EXTRA_FILES){ + for(FILE,EXTRA_FILES) { QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) } QMAKE_POST_LINK += mkdir -p \"$${DESTDIR}/include\" $$escape_expand(\\n\\t) @@ -65,9 +65,9 @@ unix:{ win32 { DESTDIR = $${DEST_LIBS} - contains(QMAKE_HOST.os, Linux){ + contains(QMAKE_HOST.os, Linux) { QMAKE_POST_LINK += mkdir -p \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ - for(FILE,EXTRA_FILES){ + for(FILE,EXTRA_FILES) { QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) # inside of libs make /include/files } QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DESTDIR}\" @@ -78,23 +78,23 @@ win32 { DEST_DIR ~= s,/,\\,g DEST_INCLUDE_DIR ~= s,/,\\,g - for(FILE,EXTRA_FILES){ + for(FILE,EXTRA_FILES) { QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) } QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DEST_DIR}\" } } -contains(CONFIG,zint){ +CONFIG(zint) { message(zint) INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt - LIBS += -L$${DEST_LIBS} - CONFIG(release, debug|release){ - LIBS += -lQtZint - } else { - LIBS += -lQtZintd - } + LIBS += -L$${DEST_LIBS} + CONFIG(release, debug|release) { + LIBS += -lQtZint + } else { + LIBS += -lQtZintd + } } #### Install mkspecs, headers and libs to QT_INSTALL_DIR @@ -112,7 +112,7 @@ INSTALLS += target ####Automatically build required translation files (*.qm) -contains(CONFIG,build_translations){ +CONFIG(build_translations) { LANGUAGES = ru es ar fr zh pl defineReplace(prependAll) { @@ -139,5 +139,3 @@ contains(CONFIG,build_translations){ } #### EN AUTOMATIC TRANSLATIONS - -