diff options
| author | 2016-07-21 10:28:52 +0200 | |
|---|---|---|
| committer | 2016-07-21 10:28:52 +0200 | |
| commit | c7125f37aa5325f84d615eaf3b8fa2e67eb7d800 (patch) | |
| tree | 04b78cb4ecbf86a7b2c67c0d9212a3a15cfc6a26 | |
| parent | Merge pull request #1890 from LFsWang/fix-encode-problem (diff) | |
| download | yuzu-c7125f37aa5325f84d615eaf3b8fa2e67eb7d800.tar.gz yuzu-c7125f37aa5325f84d615eaf3b8fa2e67eb7d800.tar.xz yuzu-c7125f37aa5325f84d615eaf3b8fa2e67eb7d800.zip | |
Fixes SDL2.dll copy to bindir on windows
| -rw-r--r-- | externals/cmake-modules/FindSDL2.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/externals/cmake-modules/FindSDL2.cmake b/externals/cmake-modules/FindSDL2.cmake index 9b8daa0d1..22ce752c5 100644 --- a/externals/cmake-modules/FindSDL2.cmake +++ b/externals/cmake-modules/FindSDL2.cmake | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | # SDL2_LIBRARY, the name of the library to link against | 3 | # SDL2_LIBRARY, the name of the library to link against |
| 4 | # SDL2_FOUND, if false, do not try to link to SDL2 | 4 | # SDL2_FOUND, if false, do not try to link to SDL2 |
| 5 | # SDL2_INCLUDE_DIR, where to find SDL.h | 5 | # SDL2_INCLUDE_DIR, where to find SDL.h |
| 6 | # SDL2_DLL_DIR, where to find SDL2.dll if it exists | ||
| 6 | # | 7 | # |
| 7 | # This module responds to the the flag: | 8 | # This module responds to the the flag: |
| 8 | # SDL2_BUILDING_LIBRARY | 9 | # SDL2_BUILDING_LIBRARY |
| @@ -149,6 +150,14 @@ FIND_LIBRARY(SDL2_LIBRARY_TEMP | |||
| 149 | ) | 150 | ) |
| 150 | 151 | ||
| 151 | IF(SDL2_LIBRARY_TEMP) | 152 | IF(SDL2_LIBRARY_TEMP) |
| 153 | if(MSVC) | ||
| 154 | get_filename_component(SDL2_DLL_DIR_TEMP ${SDL2_LIBRARY_TEMP} DIRECTORY) | ||
| 155 | if(EXISTS ${SDL2_DLL_DIR_TEMP}/SDL2.dll) | ||
| 156 | set(SDL2_DLL_DIR ${SDL2_DLL_DIR_TEMP}) | ||
| 157 | unset(SDL2_DLL_DIR_TEMP) | ||
| 158 | endif() | ||
| 159 | endif() | ||
| 160 | |||
| 152 | FIND_PATH(SDL2_INCLUDE_DIR SDL.h | 161 | FIND_PATH(SDL2_INCLUDE_DIR SDL.h |
| 153 | HINTS | 162 | HINTS |
| 154 | $ENV{SDL2DIR} | 163 | $ENV{SDL2DIR} |