summaryrefslogtreecommitdiffhomepage
path: root/src/external/glfw/CMake/modules/FindMir.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/FindMir.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/FindMir.cmake')
-rw-r--r--src/external/glfw/CMake/modules/FindMir.cmake34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/external/glfw/CMake/modules/FindMir.cmake b/src/external/glfw/CMake/modules/FindMir.cmake
new file mode 100644
index 00000000..2104df8a
--- /dev/null
+++ b/src/external/glfw/CMake/modules/FindMir.cmake
@@ -0,0 +1,34 @@
+# FindMir
+# -------
+# Finds the Mir library
+#
+# This will will define the following variables::
+#
+# MIR_FOUND - the system has Mir
+# MIR_INCLUDE_DIRS - the Mir include directory
+# MIR_LIBRARIES - the Mir libraries
+# MIR_DEFINITIONS - the Mir definitions
+
+
+find_package (PkgConfig)
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules (PC_MIR mirclient>=0.26.2 QUIET)
+
+ find_path(MIR_INCLUDE_DIR NAMES mir_toolkit/mir_client_library.h
+ PATHS ${PC_MIR_INCLUDE_DIRS})
+
+ find_library(MIR_LIBRARY NAMES mirclient
+ PATHS ${PC_MIR_LIBRARIES} ${PC_MIR_LIBRARY_DIRS})
+
+ include (FindPackageHandleStandardArgs)
+ find_package_handle_standard_args (MIR
+ REQUIRED_VARS MIR_LIBRARY MIR_INCLUDE_DIR)
+
+ if (MIR_FOUND)
+ set(MIR_LIBRARIES ${MIR_LIBRARY})
+ set(MIR_INCLUDE_DIRS ${PC_MIR_INCLUDE_DIRS})
+ set(MIR_DEFINITIONS -DHAVE_MIR=1)
+ endif()
+
+ mark_as_advanced (MIR_LIBRARY MIR_INCLUDE_DIR)
+endif()