Debian Codegraph @

cmake/Modules/FindWaylandProtocols.cmake

raw
1 #.rst:
2 # FindWaylandProtocols
3 # -------
4 #
5 # Try to find wayland-protocols on a Unix system.
6 #
7 # This will define the following variables:
8 #
9 # ``WaylandProtocols_FOUND``
10 # True if (the requested version of) wayland-protocols is available
11 # ``WaylandProtocols_VERSION``
12 # The version of wayland-protocols
13 # ``WaylandProtocols_DATADIR``
14 # The wayland protocols data directory
15
16 #=============================================================================
17 # SPDX-FileCopyrightText: 2019 Vlad Zahorodnii <[email protected]>
18 #
19 # SPDX-License-Identifier: BSD-3-Clause
20 #=============================================================================
21
22 find_package(PkgConfig)
23 pkg_check_modules(PKG_wayland_protocols QUIET wayland-protocols)
24
25 set(WaylandProtocols_VERSION ${PKG_wayland_protocols_VERSION})
26 pkg_get_variable(WaylandProtocols_DATADIR wayland-protocols pkgdatadir)
27
28 include(FindPackageHandleStandardArgs)
29 find_package_handle_standard_args(WaylandProtocols
30 FOUND_VAR WaylandProtocols_FOUND
31 REQUIRED_VARS WaylandProtocols_DATADIR
32 VERSION_VAR WaylandProtocols_VERSION
33 )
34
35 include(FeatureSummary)
36 set_package_properties(WaylandProtocols PROPERTIES
37 DESCRIPTION "Specifications of extended Wayland protocols"
38 URL "https://wayland.freedesktop.org/"
39 )