From 6b0195cb89e085b660f2c0d4400870a749a45793 Mon Sep 17 00:00:00 2001 From: Spiek Date: Tue, 18 Jul 2017 18:09:28 +0200 Subject: [PATCH] If compiling in debug mode append a "d" to the Target and also link to that files --- 3rdparty/zint-2.4.4/backend_qt4/Zint.pro | 6 +++++- demo_r1/demo_r1.pro | 14 ++++++++++++-- demo_r2/demo_r2.pro | 14 ++++++++++++-- designer/designer.pro | 13 +++++++++++-- limereport/limereport.pro | 14 ++++++++++++-- 5 files changed, 52 insertions(+), 9 deletions(-) diff --git a/3rdparty/zint-2.4.4/backend_qt4/Zint.pro b/3rdparty/zint-2.4.4/backend_qt4/Zint.pro index b8c6bd5..5ee72e0 100644 --- a/3rdparty/zint-2.4.4/backend_qt4/Zint.pro +++ b/3rdparty/zint-2.4.4/backend_qt4/Zint.pro @@ -26,7 +26,11 @@ unix{ INCLUDEPATH += $$PWD/../backend DEFINES += _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS ZINT_VERSION=\\\"$$VERSION\\\" -TARGET = QtZint +contains(CONFIG,release) { + TARGET = QtZint +} else { + TARGET = QtZintd +} !contains(DEFINES, NO_PNG) { SOURCES += $$PWD/../backend/png.c diff --git a/demo_r1/demo_r1.pro b/demo_r1/demo_r1.pro index 7f15359..20c576f 100644 --- a/demo_r1/demo_r1.pro +++ b/demo_r1/demo_r1.pro @@ -1,7 +1,12 @@ include(../common.pri) QT += core gui -TARGET = LRDemo_r1 +contains(CONFIG,release) { + TARGET = LRDemo_r1 +} else { + TARGET = LRDemo_r1d +} + TEMPLATE = app SOURCES += main.cpp\ @@ -60,7 +65,12 @@ win32 { LIBS += -L$${DEST_LIBS} -lQtZint } } - LIBS += -L$${DEST_LIBS} -llimereport + LIBS += -L$${DEST_LIBS} + contains(CONFIG,release) { + LIBS += -llimereport + } else { + LIBS += -llimereportd + } } diff --git a/demo_r2/demo_r2.pro b/demo_r2/demo_r2.pro index ae33d88..a30cc83 100644 --- a/demo_r2/demo_r2.pro +++ b/demo_r2/demo_r2.pro @@ -1,7 +1,12 @@ include(../common.pri) QT += core gui -TARGET = LRDemo_r2 +contains(CONFIG,release) { + TARGET = LRDemo_r2 +} else { + TARGET = LRDemo_r2d +} + TEMPLATE = app SOURCES += main.cpp\ @@ -57,7 +62,12 @@ win32 { LIBS += -L$${DEST_LIBS} -lQtZint } } - LIBS += -L$${DEST_LIBS} -llimereport + LIBS += -L$${DEST_LIBS} + contains(CONFIG,release) { + LIBS += -llimereport + } else { + LIBS += -llimereportd + } QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$shell_quote($$EXTRA_DIR\\*) $$shell_quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t) } diff --git a/designer/designer.pro b/designer/designer.pro index fef1c0f..f8a22c3 100644 --- a/designer/designer.pro +++ b/designer/designer.pro @@ -1,7 +1,11 @@ include(../common.pri) QT += core gui -TARGET = LRDesigner +contains(CONFIG,release) { + TARGET = LRDesigner +} else { + TARGET = LRDesignerd +} TEMPLATE = app SOURCES += main.cpp @@ -47,6 +51,11 @@ win32 { LIBS += -L$${DEST_LIBS} -lQtZint } } - LIBS += -L$${DEST_LIBS} -llimereport + LIBS += -L$${DEST_LIBS} + contains(CONFIG,release) { + LIBS += -llimereport + } else { + LIBS += -llimereportd + } } diff --git a/limereport/limereport.pro b/limereport/limereport.pro index 5832173..6f4e488 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -1,4 +1,9 @@ -TARGET = limereport +contains(CONFIG,release) { + TARGET = limereport +} else { + TARGET = limereportd +} + TEMPLATE = lib contains(CONFIG, static_build){ @@ -73,7 +78,12 @@ contains(CONFIG,zint){ message(zint) INCLUDEPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt4 DEPENDPATH += $$ZINT_PATH/backend $$ZINT_PATH/backend_qt4 - LIBS += -L$${DEST_LIBS} -lQtZint + LIBS += -L$${DEST_LIBS} + contains(CONFIG,release) { + LIBS += -lQtZint + } else { + LIBS += -lQtZintd + } } #######