fix linking with SDL_PULSEAUDIO_SHARED=OFF and SDL_X11_SHARED=OFF

This commit is contained in:
Nick Cao 2022-03-07 15:54:24 +08:00 committed by Ozkan Sezer
parent b2463a917c
commit f03215bc70
1 changed files with 3 additions and 1 deletions

View File

@ -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})