- pkg_check_modules (EGL egl)
- if (EGL_FOUND)
- include_directories (${EGL_INCLUDE_DIR})
- add_definitions (-DHAVE_EGL)
+ if (ENABLE_EGL)
+ if (NOT ENABLE_EGL STREQUAL "AUTO")
+ set (REQUIRE_EGL REQUIRED)
+ endif ()
+ pkg_check_modules (EGL egl glesv1_cm glesv2 ${REQUIRE_EGL})
+ if (EGL_FOUND)
+ include_directories (${EGL_INCLUDE_DIR})
+ add_definitions (-DHAVE_EGL)
+ endif ()
+ else ()
+ set (EGL_FOUND 0)