mirror of
https://github.com/ckb-next/ckb-next.git
synced 2026-10-10 12:27:21 -04:00
With Qt 6.5 and later, we have QNativeInterface::QWaylandApplication for low level Wayland access. For older Qt, QPlatformNativeInterface is required. QPlatformNativeInterface is a private class from Qt::GuiPrivate, which isn't idea. But it was how KDE did it in the past. FindWayland.cmake and FindWaylandProtocols.cmake are modifed version of KDE's ECM, with unused bits removed.
39 lines
1.2 KiB
CMake
39 lines
1.2 KiB
CMake
# SPDX-FileCopyrightText: 2019 Vlad Zahorodnii <[email protected]>
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
#[=======================================================================[.rst:
|
|
FindWaylandProtocols
|
|
--------------------
|
|
|
|
Try to find wayland-protocols on a Unix system.
|
|
|
|
This will define the following variables:
|
|
|
|
``WaylandProtocols_FOUND``
|
|
True if (the requested version of) wayland-protocols is available
|
|
``WaylandProtocols_VERSION``
|
|
The version of wayland-protocols
|
|
``WaylandProtocols_DATADIR``
|
|
The wayland protocols data directory
|
|
#]=======================================================================]
|
|
|
|
find_package(PkgConfig QUIET)
|
|
pkg_check_modules(PKG_wayland_protocols QUIET wayland-protocols)
|
|
|
|
set(WaylandProtocols_VERSION ${PKG_wayland_protocols_VERSION})
|
|
pkg_get_variable(WaylandProtocols_DATADIR wayland-protocols pkgdatadir)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(WaylandProtocols
|
|
FOUND_VAR WaylandProtocols_FOUND
|
|
REQUIRED_VARS WaylandProtocols_DATADIR
|
|
VERSION_VAR WaylandProtocols_VERSION
|
|
)
|
|
|
|
include(FeatureSummary)
|
|
set_package_properties(WaylandProtocols PROPERTIES
|
|
DESCRIPTION "Specifications of extended Wayland protocols"
|
|
URL "https://wayland.freedesktop.org/"
|
|
)
|