summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindEGL.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'project/cmake/modules/FindEGL.cmake')
-rw-r--r--project/cmake/modules/FindEGL.cmake48
1 files changed, 0 insertions, 48 deletions
diff --git a/project/cmake/modules/FindEGL.cmake b/project/cmake/modules/FindEGL.cmake
deleted file mode 100644
index 79bb176..0000000
--- a/project/cmake/modules/FindEGL.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
1#.rst:
2# FindEGL
3# -------
4# Finds the EGL library
5#
6# This will will define the following variables::
7#
8# EGL_FOUND - system has EGL
9# EGL_INCLUDE_DIRS - the EGL include directory
10# EGL_LIBRARIES - the EGL libraries
11# EGL_DEFINITIONS - the EGL definitions
12#
13# and the following imported targets::
14#
15# EGL::EGL - The EGL library
16
17if(PKG_CONFIG_FOUND)
18 pkg_check_modules(PC_EGL egl QUIET)
19endif()
20
21find_path(EGL_INCLUDE_DIR EGL/egl.h
22 PATHS ${PC_EGL_INCLUDEDIR})
23
24find_library(EGL_LIBRARY NAMES EGL egl
25 PATHS ${PC_EGL_LIBDIR})
26
27set(EGL_VERSION ${PC_EGL_VERSION})
28
29include(FindPackageHandleStandardArgs)
30find_package_handle_standard_args(EGL
31 REQUIRED_VARS EGL_LIBRARY EGL_INCLUDE_DIR
32 VERSION_VAR EGL_VERSION)
33
34if(EGL_FOUND)
35 set(EGL_LIBRARIES ${EGL_LIBRARY})
36 set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR})
37 set(EGL_DEFINITIONS -DHAVE_LIBEGL=1)
38
39 if(NOT TARGET EGL::EGL)
40 add_library(EGL::EGL UNKNOWN IMPORTED)
41 set_target_properties(EGL::EGL PROPERTIES
42 IMPORTED_LOCATION "${EGL_LIBRARY}"
43 INTERFACE_INCLUDE_DIRECTORIES "${EGL_INCLUDE_DIR}"
44 INTERFACE_COMPILE_DEFINITIONS HAVE_LIBEGL=1)
45 endif()
46endif()
47
48mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)