mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-14 09:25:49 +08:00
refs #482 Rationalized the copying of files from source tree to build tree.
This commit is contained in:
26
mkspecs/features/copyfiles.pri
Normal file
26
mkspecs/features/copyfiles.pri
Normal 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
|
||||
Reference in New Issue
Block a user