Cross compilations fixed

This commit is contained in:
Arin Alexander 2018-10-30 00:16:07 +03:00
parent 9182950b35
commit 9bf90cf746
4 changed files with 70 additions and 88 deletions

View File

@ -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}\"

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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){