2 # Once done this will define
3 # EGL_FOUND - System has EGL
4 # EGL_INCLUDE_DIRS - The EGL include directories
5 # EGL_LIBRARIES - The libraries needed to use EGL
7 find_package(PkgConfig)
8 pkg_check_modules(PC_EGL QUIET egl)
10 find_path(EGL_INCLUDE_DIR EGL/egl.h
11 HINTS ${PC_EGL_INCLUDEDIR} ${PC_EGL_INCLUDE_DIRS})
13 find_library(EGL_LIBRARY EGL
14 HINTS ${PC_EGL_LIBDIR} ${PC_EGL_LIBRARY_DIRS})
16 set(EGL_LIBRARIES ${EGL_LIBRARY})
17 set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR})
19 include(FindPackageHandleStandardArgs)
20 # handle the QUIETLY and REQUIRED arguments and set EGL_FOUND to TRUE
21 # if all listed variables are TRUE
22 find_package_handle_standard_args(EGL DEFAULT_MSG
23 EGL_LIBRARY EGL_INCLUDE_DIR)
25 mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)