better handling of the X11 extensions

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2016-08-13 03:08:11 +00:00
parent 6b170de289
commit 1cdf84cda1
2 changed files with 10 additions and 2 deletions

View file

@ -563,7 +563,7 @@ endif()
# keep in sync with the gui component CMake file, only definitions setup is needed here
if(WITH_X11 AND X11_FOUND)
# TODO: xim
foreach(x11ext Xshape Xinerama Xrandr Xrender XSync Xkb Xfixes Xcursor Xinput XShm)
foreach(x11ext Xinerama Xrandr Xrender Xfixes Xcursor Xinput)
# X11_${x11ext}_FOUND is set depending on the headers only
if(NOT X11_${x11ext}_FOUND OR NOT X11_${x11ext}_LIB)
message(WARNING "The X11 ${x11ext} extension was not found")
@ -571,6 +571,14 @@ if(WITH_X11 AND X11_FOUND)
katie_definition(-DQT_NO_${upperext})
endif()
endforeach()
if(NOT X11_Xkbfile_FOUND)
message(WARNING "The X11 Xkbfile extension was not found")
katie_definition(-DQT_NO_XKB)
endif()
if(NOT X11_Xext_FOUND)
message(WARNING "The X11 Xext extension was not found")
katie_definition(-DQT_NO_XSYNC -DQT_NO_XSHAPE -DQTT_NO_XSHM)
endif()
if(NOT X11_Xinput_FOUND)
message(WARNING "X11 Xinput extension was not found thus disabling tabled support too")
katie_definition(-DQT_NO_TABLET)

View file

@ -468,7 +468,7 @@ if(WITH_X11 AND X11_FOUND)
)
include_directories(${X11_INCLUDE_DIR})
# TODO: xim
foreach(x11ext Xshape Xinerama Xrandr Xrender XSync Xkb Xfixes Xcursor Xinput XShm)
foreach(x11ext Xshape Xinerama Xrandr Xrender Xfixes Xcursor Xinput Xkbfile Xext)
if(X11_${x11ext}_FOUND AND X11_${x11ext}_LIB)
set(EXTRA_GUI_LIBS
${EXTRA_GUI_LIBS}