cmake: only enable x11_xcursor and x11_xinput when its library is available
parent
8f33de8462
commit
aa7a6c0ea6
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue