diff options
| author | 2016-03-01 17:24:18 +0000 | |
|---|---|---|
| committer | 2016-03-02 14:09:02 +0000 | |
| commit | ba2a54a9dd6e5a263c5e6886e55b3bc55b95b4ab (patch) | |
| tree | 182d660b2f2c8572266144f46817e5a221aa4caf /externals/cmake-modules/WindowsCopyFiles.cmake | |
| parent | Merge pull request #1424 from MerryMage/lut_init (diff) | |
| download | yuzu-ba2a54a9dd6e5a263c5e6886e55b3bc55b95b4ab.tar.gz yuzu-ba2a54a9dd6e5a263c5e6886e55b3bc55b95b4ab.tar.xz yuzu-ba2a54a9dd6e5a263c5e6886e55b3bc55b95b4ab.zip | |
Dependencies: Remove GLFW, Add SDL2
citra: Remove GLFW, Add SDL2
FindSDL2: Do not CACHE SDL2_* variables if library is not found
EmuWindow_SDL2: Set minimal client area at initialisation time
EmuWindow_SDL2: Corrections
EmuWindow_SDL2: Fix no decorations on startup on OS X
cmake: windows_copy_files
Diffstat (limited to 'externals/cmake-modules/WindowsCopyFiles.cmake')
| -rw-r--r-- | externals/cmake-modules/WindowsCopyFiles.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/externals/cmake-modules/WindowsCopyFiles.cmake b/externals/cmake-modules/WindowsCopyFiles.cmake new file mode 100644 index 000000000..cd0c2ce47 --- /dev/null +++ b/externals/cmake-modules/WindowsCopyFiles.cmake | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # Copyright 2016 Citra Emulator Project | ||
| 2 | # Licensed under GPLv2 or any later version | ||
| 3 | # Refer to the license.txt file included. | ||
| 4 | |||
| 5 | # This file provides the function windows_copy_files. | ||
| 6 | # This is only valid on Windows. | ||
| 7 | |||
| 8 | # Include guard | ||
| 9 | if(__windows_copy_files) | ||
| 10 | return() | ||
| 11 | endif() | ||
| 12 | set(__windows_copy_files YES) | ||
| 13 | |||
| 14 | # Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR. | ||
| 15 | # This copying happens post-build. | ||
| 16 | function(windows_copy_files TARGET SOURCE_DIR DEST_DIR) | ||
| 17 | # windows commandline expects the / to be \ so switch them | ||
| 18 | string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR}) | ||
| 19 | string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR}) | ||
| 20 | |||
| 21 | # /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output | ||
| 22 | # cmake adds an extra check for command success which doesn't work too well with robocopy | ||
| 23 | # so trick it into thinking the command was successful with the || cmd /c "exit /b 0" | ||
| 24 | add_custom_command(TARGET ${TARGET} POST_BUILD | ||
| 25 | COMMAND if not exist ${DEST_DIR} mkdir ${DEST_DIR} 2> nul | ||
| 26 | COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0" | ||
| 27 | ) | ||
| 28 | endfunction() \ No newline at end of file | ||