Clean up CMake build after r188673
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Aug 2015 19:08:06 +0000 (19:08 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Aug 2015 19:08:06 +0000 (19:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148234

Reviewed by Tim Horton.

Source/JavaScriptCore:

* shell/PlatformWin.cmake:
Define WIN_CAIRO so the WinCairo jsc.exe can find the correct dlls.

Source/ThirdParty:

* gtest/CMakeLists.txt:
gtest needs to be a static library on Windows to not crash.

Source/ThirdParty/ANGLE:

* CMakeLists.txt:
Copy headers to forwarding headers.

Source/WebCore:

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformWin.cmake:
Make including ANGLE headers platform specific because EFL and GTK don't want to copy headers,
but we need to in order to get the Windows build working with each Source subdirectory isolated.

Source/WebKit:

* PlatformWin.cmake:
Include ANGLE forwarding headers directories.

Tools:

* DumpRenderTree/PlatformWin.cmake:
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformWin.cmake:
Define WIN_CAIRO so WinCairo executables can find the correct dlls in WebKitLibraries.
gtest needs to be a static library on Windows to not crash.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188694 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/shell/PlatformWin.cmake
Source/ThirdParty/ANGLE/CMakeLists.txt
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/CMakeLists.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformWin.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformWin.cmake
Tools/ChangeLog
Tools/DumpRenderTree/PlatformWin.cmake
Tools/TestWebKitAPI/CMakeLists.txt
Tools/TestWebKitAPI/PlatformWin.cmake

index 7adfe7d..f6353f4 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-20  Alex Christensen  <achristensen@webkit.org>
+
+        Clean up CMake build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148234
+
+        Reviewed by Tim Horton.
+
+        * shell/PlatformWin.cmake:
+        Define WIN_CAIRO so the WinCairo jsc.exe can find the correct dlls.
+
 2015-08-20  Mark Lam  <mark.lam@apple.com>
 
         A watchdog tests is failing on Windows.
index a6309f0..37ae18a 100644 (file)
@@ -4,6 +4,10 @@ target_link_libraries(jscdll ${JSC_LIBRARIES})
 set_target_properties(jscdll PROPERTIES FOLDER "JavaScriptCore")
 set_target_properties(jscdll PROPERTIES OUTPUT_NAME "jsc${DEBUG_SUFFIX}")
 
+if (${WTF_PLATFORM_WIN_CAIRO})
+    add_definitions(-DWIN_CAIRO)
+endif ()
+
 set(JSC_SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp)
 set(JSC_LIBRARIES shlwapi)
 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
index ebf9620..cc79c9d 100644 (file)
@@ -278,6 +278,31 @@ target_link_libraries(libGLESv2
     libANGLE
 )
 
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/egl)
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/GLES2)
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/GLSLANG)
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/khr)
+file(GLOB _files_ANGLE "${THIRDPARTY_DIR}/ANGLE/ANGLE/*.h")
+file(GLOB _files_egl "${THIRDPARTY_DIR}/ANGLE/include/egl/*.h")
+file(GLOB _files_GLES2 "${THIRDPARTY_DIR}/ANGLE/include/GLES2/*.h")
+file(GLOB _files_GLSLANG "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG/*.h")
+file(GLOB _files_khr "${THIRDPARTY_DIR}/ANGLE/include/khr/*.h")
+foreach (_file ${_files_ANGLE})
+    file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/)
+endforeach ()
+foreach (_file ${_files_egl})
+    file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/egl)
+endforeach ()
+foreach (_file ${_files_GLES2})
+    file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/GLES2)
+endforeach ()
+foreach (_file ${_files_GLSLANG})
+    file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/GLSLANG)
+endforeach ()
+foreach (_file ${_files_khr})
+    file(COPY ${_file} DESTINATION ${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/khr)
+endforeach ()
+
 set_target_properties(libANGLE PROPERTIES FOLDER "ANGLE")
 set_target_properties(libEGL PROPERTIES FOLDER "ANGLE")
 set_target_properties(libGLESv2 PROPERTIES FOLDER "ANGLE")
index 55ada0a..745de19 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-20  Alex Christensen  <achristensen@webkit.org>
+
+        Clean up CMake build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148234
+
+        Reviewed by Tim Horton.
+
+        * CMakeLists.txt:
+        Copy headers to forwarding headers.
+
 2015-08-11  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Switch Windows build to Visual Studio 2015
index 5a9ffe8..342e0a5 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-20  Alex Christensen  <achristensen@webkit.org>
+
+        Clean up CMake build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148234
+
+        Reviewed by Tim Horton.
+
+        * gtest/CMakeLists.txt:
+        gtest needs to be a static library on Windows to not crash.
+
 2015-08-11  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Switch Windows build to Visual Studio 2015
index 3d06ca0..cea356f 100644 (file)
@@ -26,12 +26,16 @@ set(GTEST_SOURCES
 
 if (WIN32)
     # MSVC 2015 requires this definition for INTMAX_MAX to be defined.
-    add_definitions(-D__STDC_LIMIT_MACROS)
+    add_definitions(-D__STDC_LIMIT_MACROS -DGTEST_CREATE_SHARED_LIBRARY=0)
+    # gtest crashes on exit on Windows if it is a dll.
+    add_library(gtest STATIC ${GTEST_SOURCES})
+else ()
+    add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=1)
+    add_library(gtest SHARED ${GTEST_SOURCES})
 endif ()
 
-add_library(gtest SHARED ${GTEST_SOURCES})
 include_directories(${GTEST_INCLUDE_DIRECTORIES})
-add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=1 -DGTEST_HAS_RTTI=0)
+add_definitions(-DGTEST_HAS_RTTI=0)
 
 # FIXME: This works around compatibility problems in the old version of the third-pary
 # googletest source code checkout. It should be removed once we upgrade to a newer version.
index 0e8826e..e5079df 100644 (file)
@@ -3187,11 +3187,6 @@ if (ENABLE_GRAPHICS_CONTEXT_3D)
     )
 endif ()
 
-list(APPEND WebCore_INCLUDE_DIRECTORIES
-    "${THIRDPARTY_DIR}/ANGLE/"
-    "${THIRDPARTY_DIR}/ANGLE/include/KHR"
-)
-
 if (ENABLE_WEB_REPLAY)
     list(APPEND WebCore_INCLUDE_DIRECTORIES
         "${JAVASCRIPTCORE_DIR}/inspector"
index 2d6835a..b4ccbd4 100644 (file)
@@ -1,3 +1,17 @@
+2015-08-20  Alex Christensen  <achristensen@webkit.org>
+
+        Clean up CMake build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148234
+
+        Reviewed by Tim Horton.
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * PlatformWin.cmake:
+        Make including ANGLE headers platform specific because EFL and GTK don't want to copy headers,
+        but we need to in order to get the Windows build working with each Source subdirectory isolated.
+
 2015-08-20  Beth Dakin  <bdakin@apple.com>
 
         Standalone image documents should send their size to the UIClient just like 
index f76a133..9393149 100644 (file)
@@ -18,6 +18,8 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/profiler"
     "${JAVASCRIPTCORE_DIR}/runtime"
     "${JAVASCRIPTCORE_DIR}/yarr"
+    "${THIRDPARTY_DIR}/ANGLE/"
+    "${THIRDPARTY_DIR}/ANGLE/include/KHR"
     "${WEBCORE_DIR}/editing/atk"
     "${WEBCORE_DIR}/page/efl"
     "${WEBCORE_DIR}/page/scrolling/coordinatedgraphics"
index 528bb5b..205f93c 100644 (file)
@@ -20,6 +20,8 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/profiler"
     "${JAVASCRIPTCORE_DIR}/runtime"
     "${JAVASCRIPTCORE_DIR}/yarr"
+    "${THIRDPARTY_DIR}/ANGLE/"
+    "${THIRDPARTY_DIR}/ANGLE/include/KHR"
     "${WEBCORE_DIR}/accessibility/atk"
     "${WEBCORE_DIR}/editing/atk"
     "${WEBCORE_DIR}/page/gtk"
index 8dcd16f..0a94a98 100644 (file)
@@ -1,6 +1,8 @@
 add_definitions(/bigobj)
 
 list(APPEND WebCore_INCLUDE_DIRECTORIES
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE"
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/KHR"
     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore"
     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/ForwardingHeaders"
     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/API"
@@ -258,6 +260,14 @@ file(COPY
     DESTINATION
     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
 )
+if (${WTF_PLATFORM_WIN_CAIRO} AND EXISTS ${WEBKIT_LIBRARIES_DIR}/cacert.pem)
+    make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
+    file(COPY
+        ${WEBKIT_LIBRARIES_DIR}/cacert.pem
+        DESTINATION
+        ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
+    )
+endif ()
 
 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore)
 
index 4fb7550..9a82eae 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-20  Alex Christensen  <achristensen@webkit.org>
+
+        Clean up CMake build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148234
+
+        Reviewed by Tim Horton.
+
+        * PlatformWin.cmake:
+        Include ANGLE forwarding headers directories.
+
 2015-08-19  Alex Christensen  <achristensen@webkit.org>
 
         CMake Windows build should not include files directly from other Source directories
index 443abfb..36a7fb0 100644 (file)
@@ -57,6 +57,10 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${DERIVED_SOURCES_WEBKIT_DIR}/include"
     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces"
     "${DERIVED_SOURCES_DIR}"
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE"
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include"
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/egl"
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/khr"
 )
 
 list(APPEND WebKit_INCLUDES
index 1c9720b..6e52c1c 100644 (file)
@@ -1,3 +1,16 @@
+2015-08-20  Alex Christensen  <achristensen@webkit.org>
+
+        Clean up CMake build after r188673
+        https://bugs.webkit.org/show_bug.cgi?id=148234
+
+        Reviewed by Tim Horton.
+
+        * DumpRenderTree/PlatformWin.cmake:
+        * TestWebKitAPI/CMakeLists.txt:
+        * TestWebKitAPI/PlatformWin.cmake:
+        Define WIN_CAIRO so WinCairo executables can find the correct dlls in WebKitLibraries.
+        gtest needs to be a static library on Windows to not crash.
+
 2015-08-19  Alex Christensen  <achristensen@webkit.org>
 
         CMake Windows build should not include files directly from other Source directories
index 19d253e..fd60575 100644 (file)
@@ -44,6 +44,10 @@ list(APPEND TestNetscapePlugin_SOURCES
     TestNetscapePlugin/win/WindowedPluginTest.cpp
 )
 
+if (${WTF_PLATFORM_WIN_CAIRO})
+    add_definitions(-DWIN_CAIRO)
+endif ()
+
 list(APPEND TestNetscapePlugin_LIBRARIES
     Msimg32
     Shlwapi
index eb934b2..f6589bd 100644 (file)
@@ -146,7 +146,13 @@ if (ENABLE_WEBKIT2)
     get_property(TestWebKitAPIInjectedBundle_PATH TARGET TestWebKitAPIInjectedBundle PROPERTY LOCATION)
 endif ()
 
-add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DGTEST_HAS_RTTI=0
+if (WIN32)
+    add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=0)
+else ()
+    add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1)
+endif ()
+
+add_definitions(-DGTEST_HAS_RTTI=0
     -DTEST_WEBKIT2_RESOURCES_DIR=\"${TESTWEBKITAPI_DIR}/Tests/WebKit2\"
     -DTEST_INJECTED_BUNDLE_PATH=\"${TestWebKitAPIInjectedBundle_PATH}\"
 )
index 96826df..4c85a42 100644 (file)
@@ -2,6 +2,10 @@ set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}")
 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
 
+if (${WTF_PLATFORM_WIN_CAIRO})
+    add_definitions(-DWIN_CAIRO)
+endif ()
+
 set(test_main_SOURCES
     ${TESTWEBKITAPI_DIR}/win/main.cpp
 )