From b3d195f0188758a14875a5a2f270e4fd190a679f Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 17 Apr 2018 00:15:38 +0200 Subject: sync with upstream --- cmake/modules/FindWaylandProtocols.cmake | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 cmake/modules/FindWaylandProtocols.cmake (limited to 'cmake/modules/FindWaylandProtocols.cmake') 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 @@ +# FindWaylandProtocols +# -------------------- +# Find wayland-protocols +# +# This will will define the following variables:: +# +# WAYLAND_PROTOCOLS_DIR - directory containing the additional Wayland protocols +# from the wayland-protocols package + +pkg_check_modules(PC_WAYLAND_PROTOCOLS wayland-protocols) +if(PC_WAYLAND_PROTOCOLS_FOUND) + pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) +endif() + +# Promote to cache variables so all code can access it +set(WAYLAND_PROTOCOLS_DIR ${WAYLAND_PROTOCOLS_DIR} CACHE INTERNAL "") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(WaylandProtocols + REQUIRED_VARS + PC_WAYLAND_PROTOCOLS_FOUND + WAYLAND_PROTOCOLS_DIR + VERSION_VAR + PC_WAYLAND_PROTOCOLS_VERSION) -- cgit v1.2.3