summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindWaylandProtocols.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindWaylandProtocols.cmake')
-rw-r--r--cmake/modules/FindWaylandProtocols.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/modules/FindWaylandProtocols.cmake b/cmake/modules/FindWaylandProtocols.cmake
new file mode 100644
index 0000000..0b96ff0
--- /dev/null
+++ b/cmake/modules/FindWaylandProtocols.cmake
@@ -0,0 +1,24 @@
1# FindWaylandProtocols
2# --------------------
3# Find wayland-protocols
4#
5# This will will define the following variables::
6#
7# WAYLAND_PROTOCOLS_DIR - directory containing the additional Wayland protocols
8# from the wayland-protocols package
9
10pkg_check_modules(PC_WAYLAND_PROTOCOLS wayland-protocols)
11if(PC_WAYLAND_PROTOCOLS_FOUND)
12 pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
13endif()
14
15# Promote to cache variables so all code can access it
16set(WAYLAND_PROTOCOLS_DIR ${WAYLAND_PROTOCOLS_DIR} CACHE INTERNAL "")
17
18include(FindPackageHandleStandardArgs)
19find_package_handle_standard_args(WaylandProtocols
20 REQUIRED_VARS
21 PC_WAYLAND_PROTOCOLS_FOUND
22 WAYLAND_PROTOCOLS_DIR
23 VERSION_VAR
24 PC_WAYLAND_PROTOCOLS_VERSION)