aboutsummaryrefslogtreecommitdiffstats
path: root/raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-06-13 22:15:48 +0200
committersalaaad2 <arthurdurant263@gmail.com>2022-06-13 22:15:48 +0200
commit95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3 (patch)
tree352480349a46d19ab5b8078ac4ccb79d27166f04 /raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake
parentmouse is captured again, pretty gud (diff)
downloadyabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.tar.gz
yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.tar.bz2
yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.tar.xz
yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.tar.zst
yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.zip
add raylib to the build chain with -O3 and -march=native
Diffstat (limited to 'raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake')
-rw-r--r--raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake26
1 files changed, 26 insertions, 0 deletions
diff --git a/raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake b/raylib/src/external/glfw/CMake/modules/FindWaylandProtocols.cmake
new file mode 100644
index 0000000..8eb83f2
--- /dev/null
+++ b/raylib/src/external/glfw/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})