SDL_image: cmake: fix exports in windows builds.

From 98c7b7de80f728364f5c479a04f7ba342267fb1f Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 11 Jul 2021 00:00:04 +0300
Subject: [PATCH] cmake: fix exports in windows builds.

(see https://github.com/libsdl-org/SDL_image/issues/177)
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 76ec4d6..fb266bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,6 +88,9 @@ add_library(SDL2::image ALIAS SDL2_image)
 target_include_directories(SDL2_image PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
 
 if (BUILD_SHARED_LIBS)
+	if(WIN32)
+	  target_compile_definitions(SDL2_image PRIVATE -DDLL_EXPORT)
+	endif()
 	target_link_libraries(SDL2_image PUBLIC SDL2::SDL2)
 else()
 	target_link_libraries(SDL2_image PUBLIC SDL2::SDL2-static)