From 3b734f0d6b9e28c1f2c4ae54e3f46e573e02f4a5 Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Fri, 9 Mar 2018 21:36:10 +0100 Subject: Initial Commit --- .../CMake/modules/FindWaylandProtocols.cmake | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 glfw-3.2.1/CMake/modules/FindWaylandProtocols.cmake (limited to 'glfw-3.2.1/CMake/modules/FindWaylandProtocols.cmake') diff --git a/glfw-3.2.1/CMake/modules/FindWaylandProtocols.cmake b/glfw-3.2.1/CMake/modules/FindWaylandProtocols.cmake new file mode 100644 index 0000000..8eb83f2 --- /dev/null +++ b/glfw-3.2.1/CMake/modules/FindWaylandProtocols.cmake @@ -0,0 +1,26 @@ +find_package(PkgConfig) + +pkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION}) + +execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols + OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR + RESULT_VARIABLE _pkgconfig_failed) +if (_pkgconfig_failed) + message(FATAL_ERROR "Missing wayland-protocols pkgdatadir") +endif() + +string(REGEX REPLACE "[\r\n]" "" WaylandProtocols_PKGDATADIR "${WaylandProtocols_PKGDATADIR}") + +find_package_handle_standard_args(WaylandProtocols + FOUND_VAR + WaylandProtocols_FOUND + REQUIRED_VARS + WaylandProtocols_PKGDATADIR + VERSION_VAR + WaylandProtocols_VERSION + HANDLE_COMPONENTS +) + +set(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND}) +set(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR}) +set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION}) -- cgit v1.2.3