kwin/cmake/modules/FindXwayland.cmake
David Redondo 805435d157 xwayland: Enable xtest libei integration
Enabling this feature makes Xwayland send xtest events via
the remote desktop portal and libei.
XWayland will create a new session for each X client (it keeps
contexts around and reuses them if the cmdline matches, so not
every xdotool invocation produces a new portal prompt).
2024-05-15 09:31:53 +00:00

42 lines
1.3 KiB
CMake

#.rst:
# FindXwayland
# -------
#
# Try to find Xwayland on a Unix system.
#
# This will define the following variables:
#
# ``Xwayland_FOUND``
# True if (the requested version of) Xwayland is available
# ``Xwayland_VERSION``
# The version of Xwayland
# ``Xwayland_HAVE_LISTENFD``
# True if (the requested version of) Xwayland has -listenfd option
# ``Xwayland_HAVE_ENABLE_EI_PORTAL``
# True if (the requested version of) Xwayland has -enable-ei-portal option
#=============================================================================
# SPDX-FileCopyrightText: 2016 Martin Gräßlin <mgraesslin@kde.org>
# SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
#=============================================================================
find_package(PkgConfig)
pkg_check_modules(PKG_xwayland QUIET xwayland)
set(Xwayland_VERSION ${PKG_xwayland_VERSION})
pkg_get_variable(Xwayland_HAVE_LISTENFD xwayland have_listenfd)
pkg_get_variable(Xwayland_HAVE_ENABLE_EI_PORTAL xwayland have_enable_ei_portal)
find_program(Xwayland_EXECUTABLE NAMES Xwayland)
find_package_handle_standard_args(Xwayland
FOUND_VAR Xwayland_FOUND
REQUIRED_VARS Xwayland_EXECUTABLE
VERSION_VAR Xwayland_VERSION
)
mark_as_advanced(
Xwayland_EXECUTABLE
Xwayland_HAVE_LISTENFD
Xwayland_VERSION
)