Sdl12-compat: avoid DLL having 'lib' prefix with Windows MinGW builds

From b56cf5257ef465530ef87ffbdbc11c6f0bc03a11 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 20 Feb 2021 00:03:24 +0300
Subject: [PATCH] avoid DLL having 'lib' prefix with Windows MinGW builds

---
 CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c643f50..4ddaf17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,11 @@ target_include_directories(SDL PRIVATE "/usr/local/include/SDL2")  # !!! FIXME
 #target_include_directories(SDL PRIVATE "/usr/X11/include")  # !!! FIXME
 add_definitions("-D_THREAD_SAFE")  # !!! FIXME
 
+# avoid DLL having 'lib' prefix with Windows MinGW builds
+if(WIN32)
+  set(CMAKE_SHARED_LIBRARY_PREFIX "")
+endif()
+
 if(UNIX OR APPLE)
     target_link_libraries(SDL PRIVATE dl)
 endif()