Commit f03215bc7091e7df1c945fb7b3113284e0a93e58

Nick Cao 2022-03-07T15:54:24

fix linking with SDL_PULSEAUDIO_SHARED=OFF and SDL_X11_SHARED=OFF

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 00901f2..697274c 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -174,7 +174,7 @@ macro(CheckPulseAudio)
         set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
         set(HAVE_PULSEAUDIO_SHARED TRUE)
       else()
-        list(APPEND EXTRA_LDFLAGS ${PKG_sPULSEAUDIO_LDFLAGS})
+        list(APPEND EXTRA_LDFLAGS ${PKG_PULSEAUDIO_LDFLAGS})
       endif()
       set(HAVE_SDL_AUDIO TRUE)
     endif()
@@ -467,6 +467,8 @@ macro(CheckX11)
         else()
           list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
         endif()
+      else()
+          list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
       endif()
 
       set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})