On Unix systems create symbolic links instead of copying files.
--HG-- branch : develop
This commit is contained in:
parent
af5a74badd
commit
1b596b325a
48
common.pri
48
common.pri
|
@ -69,20 +69,24 @@ defineTest(copyToDestdir) {
|
||||||
message("----------------------------------------------begin------------------------------------------------")
|
message("----------------------------------------------begin------------------------------------------------")
|
||||||
message("Copy to" $$DDIR "after link")
|
message("Copy to" $$DDIR "after link")
|
||||||
for(FILE, files) {
|
for(FILE, files) {
|
||||||
|
unix{
|
||||||
!exists($$DDIR/$$basename(FILE)) {
|
QMAKE_POST_LINK += ln -s -f $$quote($$FILE) $$quote($$DDIR/$$basename(FILE)) $$escape_expand(\\n\\t)
|
||||||
# Replace slashes in paths with backslashes for Windows
|
message("Command:" ln -s -f $$quote($$FILE) $$quote($$DDIR/$$basename(FILE)))
|
||||||
win32{
|
|
||||||
FILE ~= s,/,\\,g
|
|
||||||
DDIR ~= s,/,\\,g
|
|
||||||
}
|
|
||||||
QMAKE_POST_LINK += $$VCOPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
|
||||||
message("Command:" $$VCOPY $$quote($$FILE) $$quote($$DDIR))
|
|
||||||
} else {
|
} else {
|
||||||
message("File:" $$DDIR/$$basename(FILE) "already exist")
|
!exists($$DDIR/$$basename(FILE)) {
|
||||||
}
|
# Replace slashes in paths with backslashes for Windows
|
||||||
|
win32{
|
||||||
|
FILE ~= s,/,\\,g
|
||||||
|
DDIR ~= s,/,\\,g
|
||||||
|
}
|
||||||
|
QMAKE_POST_LINK += $$VCOPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
||||||
|
message("Command:" $$VCOPY $$quote($$FILE) $$quote($$DDIR))
|
||||||
|
} else {
|
||||||
|
message("File:" $$DDIR/$$basename(FILE) "already exist")
|
||||||
|
}
|
||||||
|
|
||||||
QMAKE_CLEAN += $$DDIR/$$basename(FILE)
|
QMAKE_CLEAN += $$DDIR/$$basename(FILE)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export(QMAKE_POST_LINK)
|
export(QMAKE_POST_LINK)
|
||||||
|
@ -99,15 +103,19 @@ defineTest(forceCopyToDestdir) {
|
||||||
message("----------------------------------------------begin------------------------------------------------")
|
message("----------------------------------------------begin------------------------------------------------")
|
||||||
message("Copy to" $$DDIR "after link")
|
message("Copy to" $$DDIR "after link")
|
||||||
for(FILE, files) {
|
for(FILE, files) {
|
||||||
|
unix{
|
||||||
# Replace slashes in paths with backslashes for Windows
|
QMAKE_POST_LINK += ln -s -f $$quote($$FILE) $$quote($$DDIR/$$basename(FILE)) $$escape_expand(\\n\\t)
|
||||||
win32{
|
message("Command:" ln -s -f $$quote($$FILE) $$quote($$DDIR/$$basename(FILE)))
|
||||||
FILE ~= s,/,\\,g
|
} else {
|
||||||
DDIR ~= s,/,\\,g
|
# Replace slashes in paths with backslashes for Windows
|
||||||
|
win32{
|
||||||
|
FILE ~= s,/,\\,g
|
||||||
|
DDIR ~= s,/,\\,g
|
||||||
|
}
|
||||||
|
QMAKE_POST_LINK += $$VCOPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
||||||
|
message("Command:" $$VCOPY $$quote($$FILE) $$quote($$DDIR))
|
||||||
|
QMAKE_CLEAN += $$DDIR/$$basename(FILE)
|
||||||
}
|
}
|
||||||
QMAKE_POST_LINK += $$VCOPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
|
||||||
message("Command:" $$VCOPY $$quote($$FILE) $$quote($$DDIR))
|
|
||||||
QMAKE_CLEAN += $$DDIR/$$basename(FILE)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export(QMAKE_POST_LINK)
|
export(QMAKE_POST_LINK)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user