Commit db7dfece16565352224ac534d6975b85f12d962f

Anonymous Maarten 2022-06-28T23:09:28

cmake: fix name+location of SDL2.dll in configure generated SDL2::SDL2 target

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/sdl2-config.cmake.in b/sdl2-config.cmake.in
index 37610ba..59c254e 100644
--- a/sdl2-config.cmake.in
+++ b/sdl2-config.cmake.in
@@ -106,7 +106,7 @@ list(REMOVE_ITEM _sdl2_link_libraries SDL2 SDL2main mingw32 cygwin)
 
 if(WIN32)
   set(_sdl2_implib "${SDL2_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  set(_sdl2_dll "${SDL2_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2${CMAKE_SHARED_LIBRARY_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
+  set(_sdl2_dll "${SDL2_BINDIR}/SDL2${CMAKE_SHARED_LIBRARY_SUFFIX}")
   if(EXISTS "${_sdl2_implib}" AND EXISTS "${_sdl2_dll}")
     if(NOT TARGET SDL2::SDL2)
       add_library(SDL2::SDL2 SHARED IMPORTED)