Implement ResizeObserver.
[WebKit-https.git] / Source / cmake / FindOpenGLES2.cmake
1 # Try to find OpenGLES2. Once done this will define:
2 #     OPENGLES2_FOUND
3 #     OPENGLES2_INCLUDE_DIRS
4 #     OPENGLES2_LIBRARIES
5 #     OPENGLES2_DEFINITIONS
6
7 find_package(PkgConfig)
8
9 pkg_check_modules(PC_OPENGLES2 glesv2)
10
11 if (PC_OPENGLES2_FOUND)
12     set(OPENGLES2_DEFINITIONS ${PC_OPENGLES2_CFLAGS_OTHER})
13 endif ()
14
15 find_path(OPENGLES2_INCLUDE_DIRS NAMES GLES2/gl2.h
16     HINTS ${PC_OPENGLES2_INCLUDEDIR} ${PC_OPENGLES2_INCLUDE_DIRS}
17 )
18
19 set(OPENGLES2_NAMES ${OPENGLES2_NAMES} glesv2 GLESv2)
20 find_library(OPENGLES2_LIBRARIES NAMES ${OPENGLES2_NAMES}
21     HINTS ${PC_OPENGLES2_LIBDIR} ${PC_OPENGLES2_LIBRARY_DIRS}
22 )
23
24 include(FindPackageHandleStandardArgs)
25 find_package_handle_standard_args(OpenGLES2 REQUIRED_VARS OPENGLES2_INCLUDE_DIRS OPENGLES2_LIBRARIES
26                                   FOUND_VAR OPENGLES2_FOUND)
27
28 mark_as_advanced(OPENGLES2_INCLUDE_DIRS OPENGLES2_LIBRARIES)