mirror of https://github.com/encounter/SDL.git
cmake: only enable x11_xcursor and x11_xinput when its library is available
This commit is contained in:
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)
|
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)
|
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}\"")
|
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB_SONAME}\"")
|
||||||
else()
|
else()
|
||||||
list(APPEND EXTRA_LIBS ${XCURSOR_LIB})
|
list(APPEND EXTRA_LIBS ${XCURSOR_LIB})
|
||||||
|
@ -535,9 +535,9 @@ macro(CheckX11)
|
||||||
set(SDL_VIDEO_DRIVER_X11_XDBE 1)
|
set(SDL_VIDEO_DRIVER_X11_XDBE 1)
|
||||||
endif()
|
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)
|
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}\"")
|
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB_SONAME}\"")
|
||||||
else()
|
else()
|
||||||
list(APPEND EXTRA_LIBS ${XI_LIB})
|
list(APPEND EXTRA_LIBS ${XI_LIB})
|
||||||
|
|
Loading…
Reference in New Issue