Created
July 29, 2015 10:27
-
-
Save jsrois/aa47a9119bb1b947c4ca to your computer and use it in GitHub Desktop.
function used to copy target files to an specific location
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defineTest(copyFiles) { | |
files = $$1 # first argument is a list of files | |
DDIR = $$2 # second is a destination directory | |
# first we create the destination dir | |
QMAKE_POST_LINK += $$QMAKE_MKDIR $$quote($$DDIR) $$escape_expand(\\n\\t) | |
# second we copy 'em files | |
for(FILE, files) { | |
# Replace slashes in paths with backslashes for Windows | |
win32:FILE ~= s,/,\\,g | |
win32:DDIR ~= s,/,\\,g | |
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR)/ $$escape_expand(\\n\\t) | |
# TODO: add this ^ only if necessary | |
} | |
export(QMAKE_POST_LINK) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment