2 # Once done, this will define
4 # GLES20_FOUND - system has GLES20
5 # GLES20_INCLUDE_DIRS - the GLES20 include directories
6 # GLES20_LIBRARIES - link these to use GLES20
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(GLES20_PKGCONF gles20)
14 find_path(GLES20_INCLUDE_DIR
16 PATHS ${GLES20_PKGCONF_INCLUDE_DIRS}
19 # Finally the library itself
20 find_library(GLES_LIBRARY
22 PATHS ${GLES20_PKGCONF_LIBRARY_DIRS}
25 find_library(EGL_LIBRARY
27 PATHS ${GLES20_PKGCONF_LIBRARY_DIRS}
31 find_path(EGL_INCLUDE_DIR
33 PATHS ${GLES20_PKGCONF_INCLUDE_DIRS}
41 # Set the include dir variables and the libraries and let libfind_process do the rest.
42 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
43 set(GLES20_PROCESS_INCLUDES GLES20_INCLUDE_DIR GLES20_INCLUDE_DIRS)
44 set(GLES20_PROCESS_LIBS GLES20_LIBRARY GLES20_LIBRARIES)
45 libfind_process(GLES20)