summaryrefslogtreecommitdiffhomepage
path: root/src/external/glfw/CMake/modules/FindXKBCommon.cmake
diff options
context:
space:
mode:
authorAhmad Fatoum <[email protected]>2018-05-10 22:40:41 +0200
committerAhmad Fatoum <[email protected]>2018-05-10 23:07:26 +0200
commit0df501be91a09af6b4b06bf44df86d8d06cdcada (patch)
tree9f9d0a7222b562952d0551bc17b6ca753b5f12ec /src/external/glfw/CMake/modules/FindXKBCommon.cmake
parentf11fe801809f5697c96010e0f08e26dc87c85b1b (diff)
downloadraylib-0df501be91a09af6b4b06bf44df86d8d06cdcada.tar.gz
raylib-0df501be91a09af6b4b06bf44df86d8d06cdcada.zip
Add GLFW source tree to src/external
We need the CMake stuff for wayland configuration. Otherwise, we would have to replicate that ourselves. This is the full 7ef34eb06de54dd9186d3d21a401b2ef819b59e7 tree except for tests/ examples/ and docs/
Diffstat (limited to 'src/external/glfw/CMake/modules/FindXKBCommon.cmake')
-rw-r--r--src/external/glfw/CMake/modules/FindXKBCommon.cmake34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/external/glfw/CMake/modules/FindXKBCommon.cmake b/src/external/glfw/CMake/modules/FindXKBCommon.cmake
new file mode 100644
index 00000000..0f571eea
--- /dev/null
+++ b/src/external/glfw/CMake/modules/FindXKBCommon.cmake
@@ -0,0 +1,34 @@
+# - Try to find XKBCommon
+# Once done, this will define
+#
+# XKBCOMMON_FOUND - System has XKBCommon
+# XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories
+# XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon
+# XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon
+
+find_package(PkgConfig)
+pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)
+set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})
+
+find_path(XKBCOMMON_INCLUDE_DIR
+ NAMES xkbcommon/xkbcommon.h
+ HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
+)
+
+find_library(XKBCOMMON_LIBRARY
+ NAMES xkbcommon
+ HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS}
+)
+
+set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})
+set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS})
+set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(XKBCommon DEFAULT_MSG
+ XKBCOMMON_LIBRARY
+ XKBCOMMON_INCLUDE_DIR
+)
+
+mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)
+