Commit e99a7144ffc6d62599676ed5782e39828609a63f

Anonymous Maarten 2022-06-13T18:04:51

Use list(APPEND EXTRA_LIBS) everywhere

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index de00593..a9b7660 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -673,7 +673,7 @@ macro(CheckWayland)
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
         set(HAVE_WAYLAND_SHARED TRUE)
       else()
-        set(EXTRA_LIBS ${WAYLAND_LIBRARIES} ${EXTRA_LIBS})
+        list(APPEND EXTRA_LIBS ${WAYLAND_LIBRARIES})
       endif()
 
       if(SDL_WAYLAND_LIBDECOR)
@@ -691,7 +691,7 @@ macro(CheckWayland)
                 FindLibraryAndSONAME(decor-0)
                 set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
             else()
-              set(EXTRA_LIBS ${LIBDECOR_LIBRARIES} ${EXTRA_LIBS})
+              list(APPEND EXTRA_LIBS ${LIBDECOR_LIBRARIES})
             endif()
         endif()
       endif()
@@ -1258,7 +1258,7 @@ macro(CheckKMSDRM)
         set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM "\"${GBM_LIB_SONAME}\"")
         set(HAVE_KMSDRM_SHARED TRUE)
       else()
-        set(EXTRA_LIBS ${KMSDRM_LIBRARIES} ${EXTRA_LIBS})
+        list(APPEND EXTRA_LIBS ${KMSDRM_LIBRARIES})
       endif()
     endif()
   endif()