Commit 3433f3c4cc5249da6f30bb355dc45fbee61f4655

Croydon 2021-07-08T01:18:01

CMake: Small improvement for MinGW This is currently a small patch we have in our Conan package for SDL https://github.com/bincrafters/community/blob/4dc894cc2c4df43aabf39c212aa0a31047d183e1/recipes/sdl2/all/conanfile.py#L184 Introduced in https://github.com/bincrafters/conan-sdl2/commit/9fb93a60446914da2a0fafc692cbd175c2d5db50

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f69440b..947e536 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2311,7 +2311,7 @@ if(NOT CMAKE_HOST_WIN32)
   execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh
     WORKING_DIRECTORY ${SDL2_BINARY_DIR})
 endif()
-if(NOT WINDOWS OR CYGWIN)
+if(NOT WINDOWS OR CYGWIN OR MINGW)
 
   set(prefix ${CMAKE_INSTALL_PREFIX})
 
@@ -2672,7 +2672,7 @@ else()
   set(SOPOSTFIX "")
 endif()
 
-if(NOT (WINDOWS OR CYGWIN))
+if(NOT (WINDOWS OR CYGWIN OR MINGW))
   if(SDL_SHARED)
     set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc.
     get_target_property(SONAME SDL2 OUTPUT_NAME)