cmake: only enable x11_xss/x11_xrandr/x11_xfixes when its lib is available

This commit is contained in:
Anonymous Maarten 2022-07-21 15:19:19 +02:00
parent ac9e8691a2
commit 9ad3711a6b
1 changed files with 6 additions and 6 deletions

View File

@ -570,8 +570,8 @@ macro(CheckX11)
BarrierEventID b; BarrierEventID b;
int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H) int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H)
endif() endif()
if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H) if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H AND XFIXES_LIB)
if(HAVE_X11_SHARED AND XFIXES_LIB) if(HAVE_X11_SHARED)
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"") set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
else() else()
list(APPEND EXTRA_LIBS ${XFIXES_LIB}) list(APPEND EXTRA_LIBS ${XFIXES_LIB})
@ -580,8 +580,8 @@ macro(CheckX11)
set(HAVE_X11_XFIXES TRUE) set(HAVE_X11_XFIXES TRUE)
endif() endif()
if(SDL_X11_XRANDR AND HAVE_XRANDR_H) if(SDL_X11_XRANDR AND HAVE_XRANDR_H AND XRANDR_LIB)
if(HAVE_X11_SHARED AND XRANDR_LIB) if(HAVE_X11_SHARED)
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"") set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"")
else() else()
list(APPEND EXTRA_LIBS ${XRANDR_LIB}) list(APPEND EXTRA_LIBS ${XRANDR_LIB})
@ -590,8 +590,8 @@ macro(CheckX11)
set(HAVE_X11_XRANDR TRUE) set(HAVE_X11_XRANDR TRUE)
endif() endif()
if(SDL_X11_XSCRNSAVER AND HAVE_XSS_H) if(SDL_X11_XSCRNSAVER AND HAVE_XSS_H AND XSS_LIB)
if(HAVE_X11_SHARED AND XSS_LIB) if(HAVE_X11_SHARED)
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"") set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"")
else() else()
list(APPEND EXTRA_LIBS ${XSS_LIB}) list(APPEND EXTRA_LIBS ${XSS_LIB})