Fix Debug CMake builds on Windows
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Aug 2015 19:00:48 +0000 (19:00 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Aug 2015 19:00:48 +0000 (19:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147940

Reviewed by Chris Dumez.

.:

* Source/cmake/OptionsWindows.cmake:
Put 32-bit binaries in a bin32 subdirectory and 64-bit binaries in a bin64 subdirectory.

Source/JavaScriptCore:

* PlatformWin.cmake:
Copy the plist to the JavaScriptCore.resources directory.

Source/WebCore:

* PlatformWin.cmake:
Copy localized strings to the WebKit.resources directory.

Source/WebKit:

* PlatformWin.cmake:
We need /NODEFAULTLIB with the debug version of libraries, too.

Tools:

* DumpRenderTree/PlatformWin.cmake:
* TestWebKitAPI/PlatformWin.cmake:
The BitmapImage test is not enabled on the AppleWin port.
* WinLauncher/CMakeLists.txt:
Debug builds need /NODEFAULTLIB:MSVCRTD, too.

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

12 files changed:
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformWin.cmake
Source/WebCore/ChangeLog
Source/WebCore/PlatformWin.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformWin.cmake
Source/cmake/OptionsWindows.cmake
Tools/ChangeLog
Tools/DumpRenderTree/PlatformWin.cmake
Tools/TestWebKitAPI/PlatformWin.cmake
Tools/WinLauncher/CMakeLists.txt

index 718c826..828b4d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-08-12  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Debug CMake builds on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=147940
+
+        Reviewed by Chris Dumez.
+
+        * Source/cmake/OptionsWindows.cmake:
+        Put 32-bit binaries in a bin32 subdirectory and 64-bit binaries in a bin64 subdirectory.
+
 2015-08-10  Alex Christensen  <achristensen@webkit.org>
 
         Build TestWebKitAPI with CMake on Windows
index 6b01d1b..9f06bbd 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-12  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Debug CMake builds on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=147940
+
+        Reviewed by Chris Dumez.
+
+        * PlatformWin.cmake:
+        Copy the plist to the JavaScriptCore.resources directory.
+
 2015-08-11  Geoffrey Garen  <ggaren@apple.com>
 
         Remove VM::releaseExecutableMemory
index 9575a16..e9b39e4 100644 (file)
@@ -27,3 +27,9 @@ endif ()
 list(REMOVE_ITEM JavaScriptCore_SOURCES
     inspector/JSGlobalObjectInspectorController.cpp
 )
+
+file(COPY
+    "${JAVASCRIPTCORE_DIR}/JavaScriptCore.vcxproj/JavaScriptCore.resources"
+    DESTINATION
+    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+)
index a838a4b..bef7000 100644 (file)
@@ -1,5 +1,15 @@
 2015-08-12  Alex Christensen  <achristensen@webkit.org>
 
+        Fix Debug CMake builds on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=147940
+
+        Reviewed by Chris Dumez.
+
+        * PlatformWin.cmake:
+        Copy localized strings to the WebKit.resources directory.
+
+2015-08-12  Alex Christensen  <achristensen@webkit.org>
+
         Unreviewed build fix after r188339.
 
         * bindings/js/GCController.cpp:
index c43dab8..6e34430 100644 (file)
@@ -224,3 +224,11 @@ add_custom_command(
     WORKING_DIRECTORY "${DERIVED_SOURCES_WEBCORE_DIR}"
     COMMAND echo /* Identifying AVFoundation Support */ > WebCoreHeaderDetection.h
     VERBATIM)
+
+make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
+file(COPY
+    "${WEBCORE_DIR}/English.lproj/Localizable.strings"
+    "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
+    DESTINATION
+    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
+)
index 0aae2ff..598ff3b 100644 (file)
@@ -1,3 +1,13 @@
+2015-08-12  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Debug CMake builds on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=147940
+
+        Reviewed by Chris Dumez.
+
+        * PlatformWin.cmake:
+        We need /NODEFAULTLIB with the debug version of libraries, too.
+
 2015-08-11  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Switch Windows build to Visual Studio 2015
index a6b4af3..b1b51d3 100644 (file)
@@ -447,9 +447,9 @@ list(APPEND WebKit_LIBRARIES ${CXX_LIBS})
 set(CMAKE_CXX_STANDARD_LIBRARIES "")
 
 if (${WTF_PLATFORM_WIN_CAIRO})
-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT /NODEFAULTLIB:LIBCMTD")
 else ()
-    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD")
 endif ()
 
 # If this directory isn't created before midl runs and attempts to output WebKit.tlb,
index 0ad9a67..73b6e7f 100644 (file)
@@ -110,8 +110,14 @@ WEBKIT_OPTION_END()
 include_directories("$ENV{WEBKIT_LIBRARIES}/include")
 if (${MSVC_CXX_ARCHITECTURE_ID} STREQUAL "X86")
     link_directories("$ENV{WEBKIT_LIBRARIES}/lib32")
+    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib32)
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib32)
+    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin32)
 else ()
     link_directories("$ENV{WEBKIT_LIBRARIES}/lib64")
+    set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib64)
+    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib64)
+    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin64)
 endif ()
 
 if (MSVC)
index 73d640b..bd1857f 100644 (file)
@@ -1,3 +1,16 @@
+2015-08-12  Alex Christensen  <achristensen@webkit.org>
+
+        Fix Debug CMake builds on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=147940
+
+        Reviewed by Chris Dumez.
+
+        * DumpRenderTree/PlatformWin.cmake:
+        * TestWebKitAPI/PlatformWin.cmake:
+        The BitmapImage test is not enabled on the AppleWin port.
+        * WinLauncher/CMakeLists.txt:
+        Debug builds need /NODEFAULTLIB:MSVCRTD, too.
+
 2015-08-12  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. run-gtk-tests: Use a longer timeout for slow tests.
index 7e65ab0..651c953 100644 (file)
@@ -115,7 +115,7 @@ else ()
 endif ()
 
 ADD_PRECOMPILED_HEADER("DumpRenderTreePrefix.h" "win/DumpRenderTreePrefix.cpp" DumpRenderTreeLib_SOURCES)
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD")
 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
 
 add_library(DumpRenderTreeLib SHARED ${DumpRenderTreeLib_SOURCES})
index 6d3d9b4..eae7ea8 100644 (file)
@@ -24,6 +24,16 @@ set(test_webcore_LIBRARIES
     gtest
 )
 
+set(TestWebCoreLib_SOURCES
+    ${test_main_SOURCES}
+    ${TESTWEBKITAPI_DIR}/TestsController.cpp
+    ${TESTWEBKITAPI_DIR}/Tests/WebCore/CalculationValue.cpp
+    ${TESTWEBKITAPI_DIR}/Tests/WebCore/CSSParser.cpp
+    ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp
+    ${TESTWEBKITAPI_DIR}/Tests/WebCore/TimeRanges.cpp
+    ${TESTWEBKITAPI_DIR}/Tests/WebCore/URL.cpp
+)
+
 if (${WTF_PLATFORM_WIN_CAIRO})
     list(APPEND test_webcore_LIBRARIES
         cairo
@@ -34,6 +44,9 @@ if (${WTF_PLATFORM_WIN_CAIRO})
         strmiids
         vcruntime
     )
+    list(APPEND TestWebCoreLib_SOURCES
+        ${TESTWEBKITAPI_DIR}/Tests/WebCore/win/BitmapImage.cpp
+    )
 else ()
     list(APPEND test_webcore_LIBRARIES
         CFNetwork
@@ -56,14 +69,7 @@ set(TestWTF_SOURCES
 )
 
 add_library(TestWebCoreLib SHARED
-    ${test_main_SOURCES}
-    ${TESTWEBKITAPI_DIR}/TestsController.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WebCore/win/BitmapImage.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WebCore/CalculationValue.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WebCore/CSSParser.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WebCore/TimeRanges.cpp
-    ${TESTWEBKITAPI_DIR}/Tests/WebCore/URL.cpp
+    ${TestWebCoreLib_SOURCES}
 )
 
 target_link_libraries(TestWebCoreLib ${test_webcore_LIBRARIES})
index 30eea8e..6834211 100644 (file)
@@ -45,7 +45,7 @@ else ()
     )
 endif ()
 
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wWinMainCRTStartup")
 
 if (${WTF_PLATFORM_WIN_CAIRO})