From 86e274515c9da89e4de12b28428b72760ddc8778 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 1 Oct 2026 23:55:32 +0300
Subject: [PATCH] cmake: fix os/2 dll name.
---
CMakeLists.txt | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 663199c88be4d..a0f0618838bda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -305,7 +305,7 @@ set(SDL_CFLAGS )
# When building shared lib for Windows with MinGW,
# avoid the DLL having a "lib" prefix
-if(WINDOWS)
+if(WINDOWS OR OS2)
set(CMAKE_SHARED_LIBRARY_PREFIX "")
endif()
@@ -3493,10 +3493,15 @@ if(SDL_SHARED)
set_target_properties(SDL2 PROPERTIES
DEFINE_SYMBOL BUILD_SDL)
endif()
- set_target_properties(SDL2 PROPERTIES
- VERSION ${SDL_VERSION}
- SOVERSION ${LT_REVISION}
- OUTPUT_NAME "SDL2")
+ if(OS2)
+ set_target_properties(SDL2 PROPERTIES
+ OUTPUT_NAME "SDL2")
+ else()
+ set_target_properties(SDL2 PROPERTIES
+ VERSION ${SDL_VERSION}
+ SOVERSION ${LT_REVISION}
+ OUTPUT_NAME "SDL2")
+ endif()
endif()
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT SDL_CPU_ARM32)