--- CMakeLists.txt.orig 2015-10-11 10:52:49.339119913 -0700 +++ CMakeLists.txt 2015-10-11 10:57:05.897290772 -0700 @@ -105,6 +105,7 @@ else () message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'") endif () +message(STATUS "Detected CPU: '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'") # ----------------------------------------------------------------------------- # Determine the operating system --- ./Source/cmake/OptionsGTK.cmake.orig 2015-10-11 10:57:29.834719218 -0700 +++ ./Source/cmake/OptionsGTK.cmake 2015-10-11 11:12:26.790032601 -0700 @@ -48,6 +48,7 @@ find_package(ATSPI 2.5.3) find_package(GObjectIntrospection) find_package(EGL) +find_package(OpenGLES2) find_package(GeoClue2 2.1.5) find_package(GnuTLS 3.0.0) find_package(LibNotify) @@ -56,8 +57,10 @@ find_package(GeoClue) endif () -if (ENABLE_GLES2) - find_package(OpenGLES2 REQUIRED) +if (OPENGLES2_FOUND) + if (CAIRO_FOUND) + check_include_files("cairo/cairo-gl.h" CAIRO_GLES2_FOUND) + endif () if (OPENGLES2_FOUND AND NOT(EGL_FOUND)) message(FATAL_ERROR "EGL is needed for OpenGL ES 2.0.") endif () @@ -94,9 +97,14 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_REDIRECTED_XCOMPOSITE_WINDOW OFF) endif () - if (OPENGL_FOUND) - if (GLX_FOUND) - list(APPEND CAIROGL_COMPONENTS cairo-glx) + if (OPENGL_FOUND OR OPENGLES2_FOUND) + if (OPENGLES2_FOUND) + list(APPEND CAIRO_GL_COMPONENTS cairo-glesv2) + endif () + if (OPENGL_FOUND) + if (GLX_FOUND) + list(APPEND CAIROGL_COMPONENTS cairo-glx) + endif () endif () if (EGL_FOUND) list(APPEND CAIROGL_COMPONENTS cairo-egl) @@ -104,6 +112,10 @@ find_package(CairoGL 1.10.2 COMPONENTS ${CAIROGL_COMPONENTS}) if (CAIROGL_FOUND) WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS ON) + message(STATUS "FindCairoGL found something; setting Accelerated 2D Canvas ON") + elseif (CAIRO_GLES2_FOUND) + WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS ON) + message(WARNING "FindCairoGL failed; forcing Accelerated 2D Canvas ON for GLES2") else () WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS OFF) endif () @@ -117,7 +129,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_REDIRECTED_XCOMPOSITE_WINDOW OFF) endif () -if (ENABLE_ACCELERATED_2D_CANVAS AND NOT(CAIROGL_FOUND)) +if (ENABLE_ACCELERATED_2D_CANVAS AND NOT(CAIROGL_FOUND OR CAIRO_GLES2_FOUND)) message(FATAL_ERROR "cairo-gl is needed for Accelerated 2D Canvas support") endif () @@ -342,6 +354,8 @@ if (EGL_FOUND) set(WTF_USE_EGL 1) +else () + set(WTF_USE_EGL 0) endif () if (ENABLE_SPELLCHECK) @@ -364,19 +378,19 @@ if (OPENGLES2_FOUND) set(WTF_USE_OPENGL_ES_2 1) add_definitions(-DWTF_USE_OPENGL_ES_2=1) - else () + add_definitions(-DWTF_USE_GLX=0) + elseif (OPENGL_FOUND) set(WTF_USE_OPENGL 1) add_definitions(-DWTF_USE_OPENGL=1) + if (GLX_FOUND) + add_definitions(-DWTF_USE_GLX=1) + endif () endif () if (EGL_FOUND) add_definitions(-DWTF_USE_EGL=1) endif () - if (GLX_FOUND) - add_definitions(-DWTF_USE_GLX=1) - endif () - if (ENABLE_THREADED_COMPOSITOR) add_definitions(-DWTF_USE_TILED_BACKING_STORE=1) add_definitions(-DWTF_USE_COORDINATED_GRAPHICS=1) @@ -384,6 +398,13 @@ endif () endif () +message(STATUS "WTF_USE_OPENGL_ES_2: (" ${WTF_USE_OPENGL_ES_2} ")") +message(STATUS "WTF_USE_EGL: (" ${WTF_USE_EGL} ")") +message(STATUS "WTF_USE_OPENGL: (" ${WTF_USE_OPENGL} ")") +message(STATUS "WTF_USE_GLX: (" ${WTF_USE_GLX} ")") +message(STATUS "CAIRO_GL_FOUND: (" ${CAIRO_GL_FOUND} ")") +message(STATUS "CAIRO_GLES2_FOUND: (" ${CAIRO_GLES2_FOUND} ")") + if (ENABLE_GAMEPAD_DEPRECATED) find_package(GUdev) endif ()