aboutsummaryrefslogtreecommitdiff
path: root/CMake/FindEGL.cmake
diff options
context:
space:
mode:
authorDrew DeVault <ddevault@vistarmedia.com>2017-07-11 22:16:56 -0400
committerDrew DeVault <ddevault@vistarmedia.com>2017-07-11 22:16:56 -0400
commitb08aa9fd35d650b15a5322bd1b6edea01f152f27 (patch)
tree26a5b75622d0a750478dee5c8a5d99f5b75846b6 /CMake/FindEGL.cmake
parent7b9c330bc502f7ba4899872cc7d43de95ae5136e (diff)
Revert "Merge pull request #27 from ascent12/meson"
This reverts commit 85805da021006697c85489c3e30717c2b807441c, reversing changes made to 8189c64d7f07a756abf5a6189719f02b2f1af967.
Diffstat (limited to 'CMake/FindEGL.cmake')
-rw-r--r--CMake/FindEGL.cmake41
1 files changed, 41 insertions, 0 deletions
diff --git a/CMake/FindEGL.cmake b/CMake/FindEGL.cmake
new file mode 100644
index 00000000..c044d1ce
--- /dev/null
+++ b/CMake/FindEGL.cmake
@@ -0,0 +1,41 @@
+#.rst:
+# FindEGL
+# -------
+#
+# Find EGL library
+#
+# Try to find EGL library. The following values are defined
+#
+# ::
+#
+# EGL_FOUND - True if egl is available
+# EGL_INCLUDE_DIRS - Include directories for egl
+# EGL_LIBRARIES - List of libraries for egl
+# EGL_DEFINITIONS - List of definitions for egl
+#
+#=============================================================================
+# Copyright (c) 2015 Jari Vetoniemi
+#
+# Distributed under the OSI-approved BSD License (the "License");
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+include(FeatureSummary)
+set_package_properties(EGL PROPERTIES
+ URL "http://www.khronos.org/egl/"
+ DESCRIPTION "Native Platform Interface")
+
+find_package(PkgConfig)
+pkg_check_modules(PC_EGL QUIET egl)
+find_library(EGL_LIBRARIES NAMES egl EGL HINTS ${PC_EGL_LIBRARY_DIRS})
+find_path(EGL_INCLUDE_DIRS NAMES EGL/egl.h HINTS ${PC_EGL_INCLUDE_DIRS})
+
+set(EGL_DEFINITIONS ${PC_EGL_CFLAGS_OTHER})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARIES EGL_INCLUDE_DIRS)
+mark_as_advanced(EGL_INCLUDE_DIRS EGL_LIBRARIES EGL_DEFINITIONS)
+