In https://bugs.webkit.org/show_bug.cgi?id=143293 I skipped WebGL on Windows with CMake. To get WebGL working on Windows CMake builds, a CMake build will need to be made that is similar to what I did with the ANGLE Visual Studio files. All of ANGLE needs to be compiled to make libGLESv2.dll, libEGL.dll, and translator libraries. libGLESv2.dll needs to use the HLSL translator to internally translate GLSL to HLSL, while WebCore needs to use the GLSL translator to verify and translate GLSL to GLSL.
Created attachment 258129 [details] Patch
Created attachment 258132 [details] Patch
Comment on attachment 258132 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=258132&action=review LGTM, r=me. Please fix the minor style issues I mentioned before landing. > ChangeLog:6 > + Reviewed by Tim Horton. ??? > Source/ThirdParty/ANGLE/CMakeLists.txt:19 > +if (${CMAKE_GENERATOR} MATCHES "Ninja") > +if (${MSVC_CXX_ARCHITECTURE_ID} STREQUAL "X86") > +link_directories(${WINDOWSSDKDIR}Lib/${WINDOWSSDKLIBVERSION}/um/x86) > +else () > +link_directories(${WINDOWSSDKDIR}Lib/${WINDOWSSDKLIBVERSION}/um/x64) > +endif () > +else () > +if (${MSVC_CXX_ARCHITECTURE_ID} STREQUAL "X86") > +link_directories($(WINDOWSSDKDIR)Lib/$(WINDOWSSDKLIBVERSION)/um/x86) > +else () > +link_directories($(WINDOWSSDKDIR)Lib/$(WINDOWSSDKLIBVERSION)/um/x64) > +endif () > +endif () Please indent these lines properly. > Source/WebCore/CMakeLists.txt:3629 > - add_library(ANGLESupport STATIC ${ANGLESupport_SOURCES}) > - set_target_properties(ANGLESupport PROPERTIES FOLDER "WebCore") > - > - # Suppress null conversion warnings for sources in Source/ThirdParty/ANGLE > - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") > - ADD_TARGET_PROPERTIES(ANGLESupport COMPILE_FLAGS "-Wno-null-conversion") > + if (NOT WIN32) > + add_library(ANGLESupport STATIC ${ANGLESupport_SOURCES}) > + set_target_properties(ANGLESupport PROPERTIES FOLDER "WebCore") > + > + # Suppress null conversion warnings for sources in Source/ThirdParty/ANGLE > + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") > + ADD_TARGET_PROPERTIES(ANGLESupport COMPILE_FLAGS "-Wno-null-conversion") > + endif () > + > + target_include_directories(ANGLESupport PRIVATE > + "${THIRDPARTY_DIR}/ANGLE/include" > + "${THIRDPARTY_DIR}/ANGLE/src" > + ) > + list(APPEND WebCore_LIBRARIES ANGLESupport) > + WEBKIT_SET_EXTRA_COMPILER_FLAGS(ANGLESupport IGNORECXX_WARNINGS) > endif () > - > - target_include_directories(ANGLESupport PRIVATE > - "${THIRDPARTY_DIR}/ANGLE/include" > - "${THIRDPARTY_DIR}/ANGLE/src" > - ) > - list(APPEND WebCore_LIBRARIES ANGLESupport) > - WEBKIT_SET_EXTRA_COMPILER_FLAGS(ANGLESupport IGNORECXX_WARNINGS) > endif () I would prefer if (ENABLE_GRAPHICS_CONTEXT_3D AND NOT WIN32) to nested ifs.
http://trac.webkit.org/changeset/187866