From 9ad3711a6b827f5d3923f31386507d6acc2429d6 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 21 Jul 2022 15:19:19 +0200 Subject: [PATCH] cmake: only enable x11_xss/x11_xrandr/x11_xfixes when its lib is available --- cmake/sdlchecks.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index f1bf84fee..b0a1d79b1 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -570,8 +570,8 @@ macro(CheckX11) BarrierEventID b; int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H) endif() - if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H) - if(HAVE_X11_SHARED AND XFIXES_LIB) + if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H AND XFIXES_LIB) + if(HAVE_X11_SHARED) set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"") else() list(APPEND EXTRA_LIBS ${XFIXES_LIB}) @@ -580,8 +580,8 @@ macro(CheckX11) set(HAVE_X11_XFIXES TRUE) endif() - if(SDL_X11_XRANDR AND HAVE_XRANDR_H) - if(HAVE_X11_SHARED AND XRANDR_LIB) + if(SDL_X11_XRANDR AND HAVE_XRANDR_H AND XRANDR_LIB) + if(HAVE_X11_SHARED) set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"") else() list(APPEND EXTRA_LIBS ${XRANDR_LIB}) @@ -590,8 +590,8 @@ macro(CheckX11) set(HAVE_X11_XRANDR TRUE) endif() - if(SDL_X11_XSCRNSAVER AND HAVE_XSS_H) - if(HAVE_X11_SHARED AND XSS_LIB) + if(SDL_X11_XSCRNSAVER AND HAVE_XSS_H AND XSS_LIB) + if(HAVE_X11_SHARED) set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"") else() list(APPEND EXTRA_LIBS ${XSS_LIB})