summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-07-21 15:36:28 +0200
committerGitHub <noreply@github.com>2016-07-21 15:36:28 +0200
commit624cd9cd983e294cea77a337e8aed916f28ababe (patch)
tree04b78cb4ecbf86a7b2c67c0d9212a3a15cfc6a26
parentMerge pull request #1890 from LFsWang/fix-encode-problem (diff)
parentFixes SDL2.dll copy to bindir on windows (diff)
downloadyuzu-624cd9cd983e294cea77a337e8aed916f28ababe.tar
yuzu-624cd9cd983e294cea77a337e8aed916f28ababe.tar.gz
yuzu-624cd9cd983e294cea77a337e8aed916f28ababe.tar.bz2
yuzu-624cd9cd983e294cea77a337e8aed916f28ababe.tar.lz
yuzu-624cd9cd983e294cea77a337e8aed916f28ababe.tar.xz
yuzu-624cd9cd983e294cea77a337e8aed916f28ababe.tar.zst
yuzu-624cd9cd983e294cea77a337e8aed916f28ababe.zip
-rw-r--r--externals/cmake-modules/FindSDL2.cmake9
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 @@
# SDL2_LIBRARY, the name of the library to link against
# SDL2_FOUND, if false, do not try to link to SDL2
# SDL2_INCLUDE_DIR, where to find SDL.h
+# SDL2_DLL_DIR, where to find SDL2.dll if it exists
#
# This module responds to the the flag:
# SDL2_BUILDING_LIBRARY
@@ -149,6 +150,14 @@ FIND_LIBRARY(SDL2_LIBRARY_TEMP
)
IF(SDL2_LIBRARY_TEMP)
+ if(MSVC)
+ get_filename_component(SDL2_DLL_DIR_TEMP ${SDL2_LIBRARY_TEMP} DIRECTORY)
+ if(EXISTS ${SDL2_DLL_DIR_TEMP}/SDL2.dll)
+ set(SDL2_DLL_DIR ${SDL2_DLL_DIR_TEMP})
+ unset(SDL2_DLL_DIR_TEMP)
+ endif()
+ endif()
+
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
HINTS
$ENV{SDL2DIR}