From 6ee997f78283e5f1cc0748a2f7caa7859c52d9a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?=
 <jeanmichael.celerier@gmail.com>
Date: Sun, 5 May 2024 22:48:53 -0400
Subject: [PATCH] cmake fix for emscripten whole_archive support

---
 cmake/link_as_whole.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/link_as_whole.cmake b/cmake/link_as_whole.cmake
index c6fcbae..882770b 100644
--- a/cmake/link_as_whole.cmake
+++ b/cmake/link_as_whole.cmake
@@ -1,6 +1,6 @@
 
 function (link_as_whole TARGET TYPE LIBRARY)
-  if(CMAKE_VERSION VERSION_GREATER 3.24)
+  if(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED)
     target_link_libraries(${TARGET} ${TYPE} "$<LINK_LIBRARY:WHOLE_ARCHIVE,${LIBRARY}>")
   else()
     if (APPLE)