diff --git a/demo/r1/r1.pro b/demo/r1/r1.pro index 33cfd0e..9c95ac4 100644 --- a/demo/r1/r1.pro +++ b/demo/r1/r1.pro @@ -1,28 +1,8 @@ QT += core gui script sql - -EXTRA_DIR += $$PWD/demo_reports/* - -win32:CONFIG(release, debug|release): DEST_DIR = $$OUT_PWD/demo_reports/ -win32:CONFIG(debug, debug|release): DEST_DIR = $$OUT_PWD/demo_reports/ - -unix{ - DEST_DIR = $$OUT_PWD/demo_reports/ - QMAKE_POST_LINK += mkdir -p $$quote($$DEST_DIR) | $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$DEST_DIR) $$escape_expand(\n\t) +greaterThan(QT_MAJOR_VERSION, 4){ + QT += widgets printsupport + DEFINES += HAVE_QT5 } - -win32 { - EXTRA_DIR ~= s,/,\\,g - DEST_DIR ~= s,/,\\,g - QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$DEST_DIR) $$escape_expand(\\n\\t) - CONFIG(release, debug|release) { - DEST_DIR = $$OUT_PWD/release/demo_reports/ - DEST_DIR ~= s,/,\\,g - QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$DEST_DIR) $$escape_expand(\\n\\t) - } -} - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport - TARGET = LRDemo TEMPLATE = app @@ -33,17 +13,55 @@ HEADERS += mainwindow.h FORMS += mainwindow.ui -win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../lib/release -llimereport -else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../lib/debug -llimereport -else:unix:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../lib/debug -llimereport -else:unix:CONFIG(release, debug|release): LIBS += -L$$PWD/../../lib/release -llimereport - INCLUDEPATH += $$PWD/../../include -DEPENDPATH += $$PWD/../../include +DEPENDPATH += $$PWD/../../include RESOURCES += \ r1.qrc -win32 { - RC_FILE += mainicon.rc + +EXTRA_DIR += $$PWD/demo_reports/* + +CONFIG(release, debug|release){ + message(Release) + BUILD_TYPE = release +}else{ + message(Debug) + BUILD_TYPE = debug +} +CONFIG -= app_bundle + +unix{ + UNIX_DIR = $$OUT_PWD/../build/unix + DEST_DIR = $${UNIX_DIR}/$${BUILD_TYPE}/demo_reports + MOC_DIR = $${DEST_DIR}/moc + UI_DIR = $${DEST_DIR}/ui + UI_HEADERS_DIR = $${DEST_DIR}/ui + UI_SOURCES_DIR = $${DEST_DIR}/ui + OBJECTS_DIR = $${DEST_DIR}/obj + RCC_DIR = $${DEST_DIR}/rcc + + LIBS += -L$$PWD/../../lib/$${BUILD_TYPE} -llimereport + DESTDIR = $$DEST_DIR/bin + QMAKE_POST_LINK += mkdir -p $$quote($$DESTDIR) | $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$DESTDIR) $$escape_expand(\n\t) +} + +win32 { + WIN32_DIR = $$OUT_PWD/../build/win32 + EXTRA_DIR ~= s,/,\\,g + + DEST_DIR = $${WIN32_DIR}/$${BUILD_TYPE}/demo_reports/ + DEST_DIR ~= s,/,\\,g + MOC_DIR = $${DEST_DIR}/moc + UI_DIR = $${DEST_DIR}/ui + UI_HEADERS_DIR = $${DEST_DIR}/ui + UI_SOURCES_DIR = $${DEST_DIR}/ui + OBJECTS_DIR = $${DEST_DIR}/obj + RCC_DIR = $${DEST_DIR}/rcc + + DESTDIR = $$DEST_DIR/bin + RC_FILE += mainicon.rc + + QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$DESTDIR) $$escape_expand(\\n\\t) + LIBS += -L$$PWD/../../lib/$${BUILD_TYPE} -llimereport } diff --git a/limereport.pro b/limereport.pro index 9bc8022..5f4a9ae 100644 --- a/limereport.pro +++ b/limereport.pro @@ -25,6 +25,12 @@ unix { for(FILE,EXTRA_FILES){ QMAKE_POST_LINK += $$quote($$QMAKE_COPY $${FILE} $${DEST_DIR}$$escape_expand(\n\t)) } + MOC_DIR = $${OUT_PWD}/unix/moc + UI_DIR = $${OUT_PWD}/unix/ui + UI_HEADERS_DIR = $${OUT_PWD}/unix/ui + UI_SOURCES_DIR = $${OUT_PWD}/unix/ui + OBJECTS_DIR = $${OUT_PWD}/unix/obj + RCC_DIR = $${OUT_PWD}/unix/rcc } win32 { @@ -33,6 +39,12 @@ win32 { for(FILE,EXTRA_FILES){ QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DEST_DIR) $$escape_expand(\\n\\t) } + MOC_DIR = $${OUT_PWD}/win32/moc + UI_DIR = $${OUT_PWD}/win32/ui + UI_HEADERS_DIR = $${OUT_PWD}/win32/ui + UI_SOURCES_DIR = $${OUT_PWD}/win32/ui + OBJECTS_DIR = $${OUT_PWD}/win32/obj + RCC_DIR = $${OUT_PWD}/win32/rcc } DESTDIR = $$PWD/lib