Skip to content

Commit

Permalink
cmake: only enable x11_xcursor and x11_xinput when its library is ava…
Browse files Browse the repository at this point in the history
…ilable
  • Loading branch information
madebr committed Jul 21, 2022
1 parent 8f33de8 commit aa7a6c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmake/sdlchecks.cmake
Expand Up @@ -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})
Expand All @@ -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})
Expand Down

0 comments on commit aa7a6c0

Please sign in to comment.