Commit 9633f468 authored by Tapani Pälli's avatar Tapani Pälli

cmake: require libxkbcommon when building with Wayland

This enables us to support keys properly on Wayland backend.
Signed-off-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
parent 65e68a7a
......@@ -151,6 +151,13 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (WAYLAND_FOUND)
set(PIGLIT_HAS_WAYLAND True)
add_definitions(-DPIGLIT_HAS_WAYLAND)
FIND_LIBRARY(HAVE_XKBCOMMON NAMES xkbcommon)
if(NOT HAVE_XKBCOMMON)
message(FATAL_ERROR "Wayland support requires xkbcommon. "
"Failed to find xkbcommon library.")
endif()
pkg_check_modules(XKBCOMMON QUIET xkbcommon)
endif()
pkg_check_modules(LIBDRM QUIET libdrm)
......
......@@ -17,6 +17,11 @@ if(HAVE_LIBCACA)
link_libraries(caca)
endif()
if(HAVE_XKBCOMMON)
link_libraries(${XKBCOMMON_LIBRARIES})
include_directories(${XKBCOMMON_INCLUDE_DIRS})
endif()
if(PNG_FOUND)
link_libraries(${PNG_LIBRARIES})
include_directories(${PNG_INCLUDE_DIRS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment