From 9bf90cf7462d020e70a8967677e55218142a7950 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Tue, 30 Oct 2018 00:16:07 +0300 Subject: [PATCH] Cross compilations fixed --- common.pri | 2 +- demo_r1/demo_r1.pro | 68 ++++++++++++++++----------------------- demo_r2/demo_r2.pro | 64 +++++++++++++++--------------------- limereport/limereport.pro | 24 +++++++++----- 4 files changed, 70 insertions(+), 88 deletions(-) diff --git a/common.pri b/common.pri index 714f6bf..91b3a9c 100644 --- a/common.pri +++ b/common.pri @@ -75,7 +75,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 103 +LIMEREPORT_VERSION_RELEASE = 105 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/demo_r1/demo_r1.pro b/demo_r1/demo_r1.pro index 128cc34..8c09816 100644 --- a/demo_r1/demo_r1.pro +++ b/demo_r1/demo_r1.pro @@ -26,24 +26,7 @@ macx{ } unix:{ - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -llimereportd - } else { - LIBS += -llimereport - } - !contains(CONFIG, static_build){ - contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} - - CONFIG(debug, debug|release) { - LIBS += -lQtZintd - } else { - LIBS += -lQtZint - } - } - } DESTDIR = $$DEST_DIR # QMAKE_POST_LINK += mkdir -p $$quote($$REPORTS_DIR) | QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$REPORTS_DIR) $$escape_expand(\n\t) @@ -60,33 +43,36 @@ unix:{ } win32 { - EXTRA_DIR ~= s,/,\\,g - DEST_DIR ~= s,/,\\,g - REPORTS_DIR ~= s,/,\\,g - DESTDIR = $$DEST_DIR - RC_FILE += mainicon.rc + contains(QMAKE_HOST.os, Linux){ + QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$REPORTS_DIR) $$escape_expand(\n\t) + } else { + EXTRA_DIR ~= s,/,\\,g + DEST_DIR ~= s,/,\\,g + REPORTS_DIR ~= s,/,\\,g - QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t) - #QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR\\*) $$quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t) - !contains(CONFIG, static_build){ - - contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -lQtZintd - } else { - LIBS += -lQtZint - } - } + RC_FILE += mainicon.rc + + QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t) + #QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR\\*) $$quote($$REPORTS_DIR\\demo_reports) $$escape_expand(\\n\\t) } - - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -llimereportd - } else { - LIBS += -llimereport - } +} + +LIBS += -L$${DEST_LIBS} +CONFIG(debug, debug|release) { + LIBS += -llimereportd +} else { + LIBS += -llimereport } +!contains(CONFIG, static_build){ + contains(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 8ff5356..707649b 100644 --- a/demo_r2/demo_r2.pro +++ b/demo_r2/demo_r2.pro @@ -26,22 +26,6 @@ macx{ } unix:{ - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -llimereportd - } else { - LIBS += -llimereport - } - !contains(CONFIG, static_build){ - contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -lQtZintd - } else { - LIBS += -lQtZint - } - } - } DESTDIR = $$DEST_DIR QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$REPORTS_DIR) $$escape_expand(\n\t) linux{ @@ -56,30 +40,34 @@ unix:{ } win32 { - EXTRA_DIR ~= s,/,\\,g - DEST_DIR ~= s,/,\\,g - REPORTS_DIR ~= s,/,\\,g - DESTDIR = $$DEST_DIR - RC_FILE += mainicon.rc - !contains(CONFIG, static_build){ - contains(CONFIG,zint){ - LIBS += -L$${DEST_LIBS} - CONFIG(debug, debug|release) { - LIBS += -lQtZintd - } else { - LIBS += -lQtZint - } - } - } - LIBS += -L$${DEST_LIBS} - - CONFIG(debug, debug|release) { - LIBS += -llimereportd + contains(QMAKE_HOST.os, Linux){ + QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$REPORTS_DIR) $$escape_expand(\n\t) } else { - LIBS += -llimereport + EXTRA_DIR ~= s,/,\\,g + DEST_DIR ~= s,/,\\,g + REPORTS_DIR ~= s,/,\\,g + + RC_FILE += mainicon.rc + + QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t) } - - QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$$EXTRA_DIR\" \"$$REPORTS_DIR\\demo_reports\" $$escape_expand(\\n\\t) } +LIBS += -L$${DEST_LIBS} +CONFIG(debug, debug|release) { + LIBS += -llimereportd +} else { + LIBS += -llimereport +} + +!contains(CONFIG, static_build){ + contains(CONFIG,zint){ + LIBS += -L$${DEST_LIBS} + CONFIG(debug, debug|release) { + LIBS += -lQtZintd + } else { + LIBS += -lQtZint + } + } +} diff --git a/limereport/limereport.pro b/limereport/limereport.pro index dff9004..3aa045c 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -64,17 +64,25 @@ unix:{ } win32 { - EXTRA_FILES ~= s,/,\\,g - BUILD_DIR ~= s,/,\\,g DESTDIR = $${DEST_LIBS} - DEST_DIR = $$DESTDIR/include - DEST_DIR ~= s,/,\\,g - DEST_INCLUDE_DIR ~= s,/,\\,g + contains(QMAKE_HOST.os, Linux){ + QMAKE_POST_LINK += mkdir -p $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ + for(FILE,EXTRA_FILES){ + QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t) # inside of libs make /include/files + } + QMAKE_POST_LINK += $$QMAKE_COPY_DIR $$quote($${DEST_INCLUDE_DIR}) $$quote($${DESTDIR}) + } else { + EXTRA_FILES ~= s,/,\\,g + BUILD_DIR ~= s,/,\\,g + DEST_DIR = $$DESTDIR/include + DEST_DIR ~= s,/,\\,g + DEST_INCLUDE_DIR ~= s,/,\\,g - for(FILE,EXTRA_FILES){ - QMAKE_POST_LINK += $$QMAKE_COPY \"$$FILE\" \"$${DEST_INCLUDE_DIR}\" $$escape_expand(\\n\\t) + 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}\" } - QMAKE_POST_LINK += $$QMAKE_COPY_DIR \"$${DEST_INCLUDE_DIR}\" \"$${DEST_DIR}\" } contains(CONFIG,zint){