diff options
| author | 2022-12-31 14:23:38 +0100 | |
|---|---|---|
| committer | 2023-01-02 18:22:07 +0100 | |
| commit | eceee8c3d930563e26841d556f9acb965eab67c8 (patch) | |
| tree | c17a3f5362f35d7ffbcc46c881f1b656e71db81b /externals/cmake-modules/WindowsCopyFiles.cmake | |
| parent | Merge pull request #9541 from abouvier/cmake-option (diff) | |
| download | yuzu-eceee8c3d930563e26841d556f9acb965eab67c8.tar.gz yuzu-eceee8c3d930563e26841d556f9acb965eab67c8.tar.xz yuzu-eceee8c3d930563e26841d556f9acb965eab67c8.zip | |
cmake: move find-modules to root cmake dir
Diffstat (limited to 'externals/cmake-modules/WindowsCopyFiles.cmake')
| -rw-r--r-- | externals/cmake-modules/WindowsCopyFiles.cmake | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/externals/cmake-modules/WindowsCopyFiles.cmake b/externals/cmake-modules/WindowsCopyFiles.cmake deleted file mode 100644 index 08b598365..000000000 --- a/externals/cmake-modules/WindowsCopyFiles.cmake +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | # SPDX-FileCopyrightText: 2018 yuzu Emulator Project | ||
| 2 | # SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | # This file provides the function windows_copy_files. | ||
| 5 | # This is only valid on Windows. | ||
| 6 | |||
| 7 | # Include guard | ||
| 8 | if(__windows_copy_files) | ||
| 9 | return() | ||
| 10 | endif() | ||
| 11 | set(__windows_copy_files YES) | ||
| 12 | |||
| 13 | # Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR. | ||
| 14 | # This copying happens post-build. | ||
| 15 | function(windows_copy_files TARGET SOURCE_DIR DEST_DIR) | ||
| 16 | # windows commandline expects the / to be \ so switch them | ||
| 17 | string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR}) | ||
| 18 | string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR}) | ||
| 19 | |||
| 20 | # /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output | ||
| 21 | # cmake adds an extra check for command success which doesn't work too well with robocopy | ||
| 22 | # so trick it into thinking the command was successful with the || cmd /c "exit /b 0" | ||
| 23 | add_custom_command(TARGET ${TARGET} POST_BUILD | ||
| 24 | COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR} | ||
| 25 | COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0" | ||
| 26 | ) | ||
| 27 | endfunction() | ||