summaryrefslogtreecommitdiff
path: root/cmake/Modules/FindGBM.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/FindGBM.cmake')
-rw-r--r--cmake/Modules/FindGBM.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/Modules/FindGBM.cmake b/cmake/Modules/FindGBM.cmake
new file mode 100644
index 0000000..4deb5eb
--- /dev/null
+++ b/cmake/Modules/FindGBM.cmake
@@ -0,0 +1,18 @@
+#
+# Try to find GBM library and include path.
+# Once done this will define
+#
+# GBM_FOUND
+# GBM_INCLUDE_PATH
+# GBM_LIBRARY
+#
+
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_GBM gbm QUIET)
+endif()
+
+find_path(GBM_INCLUDE_DIR NAMES gbm.h)
+find_library(GBM_LIBRARY NAMES gbm)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GBM DEFAULT_MSG GBM_LIBRARY GBM_INCLUDE_DIR)