libobs: Add Wayland hotkey infrastructure
Users on Wayland are displeased that they cannot see their hotkey bindings. This enables key reporting like X11, and has the infrastructure in place in case Wayland ever decides to allow for capturing input.
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
21fdd83b7e
commit
0729007f19
37
cmake/Modules/FindXkbcommon.cmake
Normal file
37
cmake/Modules/FindXkbcommon.cmake
Normal file
@@ -0,0 +1,37 @@
|
||||
# Once done these will be defined:
|
||||
#
|
||||
# XKBCOMMON_FOUND XKBCOMMON_INCLUDE_DIRS XKBCOMMON_LIBRARIES
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_XKBCOMMON QUIET xkbcommon)
|
||||
endif()
|
||||
|
||||
find_path(
|
||||
XKBCOMMON_INCLUDE_DIR
|
||||
NAMES xkbcommon/xkbcommon.h
|
||||
HINTS ${_XKBCOMMON_INCLUDE_DIRS}
|
||||
PATHS /usr/include /usr/local/include /opt/local/include)
|
||||
|
||||
find_library(
|
||||
XKBCOMMON_LIB
|
||||
NAMES xkbcommon libxkbcommon
|
||||
HINTS ${_XKBCOMMON_LIBRARY_DIRS}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Xkbcommon DEFAULT_MSG XKBCOMMON_LIB
|
||||
XKBCOMMON_INCLUDE_DIR)
|
||||
mark_as_advanced(XKBCOMMON_INCLUDE_DIR XKBCOMMON_LIB)
|
||||
|
||||
if(XKBCOMMON_FOUND)
|
||||
set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
|
||||
set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIB})
|
||||
|
||||
if(NOT TARGET Xkbcommon::Xkbcommon)
|
||||
add_library(Xkbcommon::Xkbcommon INTERFACE IMPORTED)
|
||||
set_target_properties(
|
||||
Xkbcommon::Xkbcommon PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${XKBCOMMON_INCLUDE_DIRS}")
|
||||
endif()
|
||||
endif()
|
Reference in New Issue
Block a user