SDL: cmake: added target_properties for os/2.

From f199f832e923b928648e168cdbd7346dab37bdca Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 12 Jan 2022 20:22:28 +0300
Subject: [PATCH] cmake: added target_properties for os/2.

---
 CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ec19a03eec..2b1fc579952 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2439,7 +2439,6 @@ elseif(PSP)
 
 elseif(OS2)
   list(APPEND EXTRA_CFLAGS "-DOS2EMX_PLAIN_CHAR")
-  list(APPEND EXTRA_CFLAGS "-DBUILD_SDL")
 
   file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/os2/*.c)
   set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
@@ -2858,6 +2857,13 @@ if(SDL_SHARED)
       VERSION ${LT_VERSION}
       SOVERSION ${LT_MAJOR}
       OUTPUT_NAME "SDL2-${LT_RELEASE}")
+  elseif(OS2)
+    set_target_properties(SDL2 PROPERTIES
+        DEFINE_SYMBOL BUILD_SDL)
+    set_target_properties(SDL2 PROPERTIES
+      VERSION ${LT_VERSION}
+      SOVERSION ${LT_MAJOR}
+      OUTPUT_NAME "SDL2")
   else()
     if(WINDOWS OR CYGWIN)
       set_target_properties(SDL2 PROPERTIES