From aa7a6c0ea662c5e48b21f320459efe9fd43ba3b4 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 21 Jul 2022 14:38:57 +0200 Subject: [PATCH] cmake: only enable x11_xcursor and x11_xinput when its library is available --- cmake/sdlchecks.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index 31d26486c..f1bf84fee 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -520,9 +520,9 @@ macro(CheckX11) check_symbol_exists(XkbKeycodeToKeysym "X11/Xlib.h;X11/XKBlib.h" SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM) - if(SDL_X11_XCURSOR AND HAVE_XCURSOR_H) + if(SDL_X11_XCURSOR AND HAVE_XCURSOR_H AND XCURSOR_LIB) set(HAVE_X11_XCURSOR TRUE) - if(HAVE_X11_SHARED AND XCURSOR_LIB) + if(HAVE_X11_SHARED) set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB_SONAME}\"") else() list(APPEND EXTRA_LIBS ${XCURSOR_LIB}) @@ -535,9 +535,9 @@ macro(CheckX11) set(SDL_VIDEO_DRIVER_X11_XDBE 1) endif() - if(SDL_X11_XINPUT AND HAVE_XINPUT2_H) + if(SDL_X11_XINPUT AND HAVE_XINPUT2_H AND XI_LIB) set(HAVE_X11_XINPUT TRUE) - if(HAVE_X11_SHARED AND XI_LIB) + if(HAVE_X11_SHARED) set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB_SONAME}\"") else() list(APPEND EXTRA_LIBS ${XI_LIB})