Optimization copying files.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-11 20:27:47 +03:00
parent 2c042b82ae
commit 97fdd161b7
6 changed files with 33 additions and 9 deletions

View File

@ -37,6 +37,7 @@ defineTest(copyToDestdir) {
message("Copy to" $$DDIR "after link")
for(FILE, files) {
!exists($$DDIR/$$basename(FILE)) {
# Replace slashes in paths with backslashes for Windows
win32{
FILE ~= s,/,\\,g
@ -44,9 +45,15 @@ defineTest(copyToDestdir) {
}
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
message("Command:" $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR))
} else {
message("File:" $$DDIR/$$basename(FILE) "already exist")
}
QMAKE_CLEAN += $$DDIR/$$basename(FILE)
}
export(QMAKE_POST_LINK)
export(QMAKE_CLEAN)
message("----------------------------------------------end---------------------------------------------------")
}

View File

@ -50,7 +50,6 @@ DATA_RESOURCE = share/resources/diagrams.qrc # External Binary Resource
# Compilation will fail without this files after we added them to this section.
OTHER_FILES += \
share/resources/tape.rc \ # For Windows system.
share/resources/tapeicon/64x64/logo.ico \ # Tape's logo.
$$DATA_RESOURCE
@ -347,6 +346,8 @@ diagrams.commands = $$shell_path($$[QT_INSTALL_BINS]/rcc) --binary --no-compress
QMAKE_EXTRA_COMPILERS += diagrams
QMAKE_CLEAN += $${OUT_PWD}/$${DESTDIR}/diagrams.rcc
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
# do nothing
} else {
@ -368,6 +369,10 @@ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET}
}
!macx{
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
}
}
}

View File

@ -54,7 +54,6 @@ RESOURCES += \
# Compilation will fail without this files after we added them to this section.
OTHER_FILES += \
share/resources/valentina.rc \ # For Windows system.
share/resources/icon/64x64/icon64x64.ico # Valentina's logo.
# Set using ccache. Function enable_ccache() defined in common.pri.
@ -1999,8 +1998,11 @@ for(_translation_name, INSTALL_TRANSLATIONS) {
_translation_name_qm = $$basename(_translation_name)
_translation_name_ts = $$section(_translation_name_qm, ".", 0, 0).ts
!exists($${PWD}/$$_translation_name) {
system($$shell_path($$[QT_INSTALL_BINS]/$$LRELEASE) -removeidentical -nounfinished $$shell_path($${PWD}/$${TRANSLATIONS_PATH}/$$_translation_name_ts) -qm $$shell_path($${PWD}/$$_translation_name))
}
QMAKE_CLEAN += $${PWD}/$$_translation_name
}
for(DIR, INSTALL_TRANSLATIONS) {
#add these absolute paths to a variable which
@ -2160,6 +2162,10 @@ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET}
}
!macx{
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
}
}
}

View File

@ -126,6 +126,8 @@ CONFIG(debug, debug|release){
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
}
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
}
}

View File

@ -132,6 +132,8 @@ CONFIG(debug, debug|release){
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
}
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
}
}

View File

@ -113,6 +113,8 @@ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
QMAKE_POST_LINK += objcopy --only-keep-debug $(TARGET) $(TARGET).debug &&
QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET)
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
}
}