refs #482 Rationalized the copying of files from source tree to build tree.

This commit is contained in:
Mathew Sutcliffe
2015-10-06 18:09:23 +01:00
parent a5d8db2354
commit e4adad45d0
9 changed files with 54 additions and 55 deletions

View File

@@ -0,0 +1,26 @@
copy_files.name = COPY
copy_files.input = COPY_FILES
copy_files.CONFIG = no_link
copy_files.output_function = fileCopyDestination
defineReplace(fileCopyDestination) {
return($$DestRoot/$$relative_path($$1))
}
win32:isEmpty(MINGW_IN_SHELL) {
copy_files.commands = copy /y ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
}
else {
copy_files.commands = mkdir -p `dirname ${QMAKE_FILE_OUT}` && \
cp ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
}
QMAKE_EXTRA_COMPILERS += copy_files
# This CONFIG should be all that is needed to add a dependency to "make all"
# but some snafu with absolute vs. relative paths necessitates this workaround
# with PRE_TARGETDEPS instead.
#copy_files.CONFIG += target_predeps
PRE_TARGETDEPS += compiler_copy_files_make_all