RESOLVED FIXED 143311
make Windows CMake build for ANGLE and WebGL
https://bugs.webkit.org/show_bug.cgi?id=143311
Summary make Windows CMake build for ANGLE and WebGL
Alex Christensen
Reported 2015-04-01 11:35:47 PDT
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.
Attachments
Patch (20.86 KB, patch)
2015-08-03 16:01 PDT, Alex Christensen
no flags
Patch (20.97 KB, patch)
2015-08-03 16:24 PDT, Alex Christensen
ossy: review+
Alex Christensen
Comment 1 2015-08-03 16:01:13 PDT
Alex Christensen
Comment 2 2015-08-03 16:24:51 PDT
Csaba Osztrogonác
Comment 3 2015-08-04 03:33:57 PDT
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.
Alex Christensen
Comment 4 2015-08-04 10:50:07 PDT
Note You need to log in before you can comment on or make changes to this bug.