SDL_image: cmake: add link dependency on symbol version script

From 322b5a4ca424a8d6311bd33888953e30f8fdbe61 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 15 May 2024 22:53:00 +0200
Subject: [PATCH] cmake: add link dependency on symbol version script

---
 cmake/PrivateSdlFunctions.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmake/PrivateSdlFunctions.cmake b/cmake/PrivateSdlFunctions.cmake
index b414607c..0bd77bb2 100644
--- a/cmake/PrivateSdlFunctions.cmake
+++ b/cmake/PrivateSdlFunctions.cmake
@@ -289,6 +289,7 @@ function(sdl_target_link_option_version_file TARGET VERSION_SCRIPT)
     check_linker_support_version_script(HAVE_WL_VERSION_SCRIPT)
     if(HAVE_WL_VERSION_SCRIPT)
         target_link_options(${TARGET} PRIVATE "-Wl,--version-script=${VERSION_SCRIPT}")
+        set_property(TARGET ${TARGET} APPEND PROPERTY LINK_DEPENDS "${VERSION_SCRIPT}")
     else()
         if(LINUX OR ANDROID)
             message(FATAL_ERROR "Linker does not support '-Wl,--version-script=xxx.sym'. This is required on the current host platform.")