Build TestWebKitAPI with CMake on Windows
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Aug 2015 00:09:07 +0000 (00:09 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Aug 2015 00:09:07 +0000 (00:09 +0000)
commit812ce442a946463483d574d70c4b1c1e1e332969
tree2035d7a25795fd756ab4a9ec63c6866295fcef51
parent7b6cfe7f3eb122c4a748d2560b51e4783f5000f6
Build TestWebKitAPI with CMake on Windows
https://bugs.webkit.org/show_bug.cgi?id=147851

Reviewed by Chris Dumez.

.:

* Source/cmake/OptionsWindows.cmake:
Enable api tests and set USE_SYSTEM_MALLOC to avoid warnings when redefining it.

Source/ThirdParty:

* gtest/CMakeLists.txt:
Include DerivedSources to find WTF/WTFHeaderDetection.h.

Source/WebCore:

* PlatformWin.cmake:
Remove RenderThemeWin.cpp which is included in RenderingAllInOne.cpp.
* WebCorePrefix.h:
Include cmakeconfig.h before wtf/Platform.h like we do in JavaScriptCore's config.h to avoid warnings and redefining ENABLE_*  macros.

Source/WebKit:

* PlatformWin.cmake:
WinCairo libraries conflict with LIBCMT.lib, AppleWin libraries conflict with MSVCRT.lib,
so different /NODEFAULTLIB is needed to link WebKit.dll successfully.

Tools:

* CMakeLists.txt:
* TestWebKitAPI/CMakeLists.txt:
Removed TestJavaScriptCore because JavaScriptCore's API tests are elsewhere and this was just making an empty binary.
Surrounded WebKit2-specific features with ENABLE_WEBKIT2 checks.
Include directories after the Platform*.cmake is included because HostWindow.h needs to be found in Tools/TestWebKitAPI/win
before we look in Source/WebCore/platform, where another file named HostWindow.h exists.
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/PlatformGTK.cmake:
Windows needs all the binaries to be in the same directory to find gtest.dll and the other dlls.
I did this without changing the directory structure of the existing EFL and GTK builds.
* TestWebKitAPI/PlatformWin.cmake: Added.
* TestWebKitAPI/win/main.cpp:
(main):
(dllLauncherEntryPoint):
Added so we can launch TestWebKitAPI executables after finding the AAS directory.
* WinLauncher/CMakeLists.txt:
AppleWin port needs /NODEFAULTLIB:MSVCRT.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
ChangeLog
Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformWin.cmake
Source/WebCore/WebCorePrefix.h
Source/WebKit/ChangeLog
Source/WebKit/PlatformWin.cmake
Source/cmake/OptionsWindows.cmake
Tools/CMakeLists.txt
Tools/ChangeLog
Tools/TestWebKitAPI/CMakeLists.txt
Tools/TestWebKitAPI/PlatformEfl.cmake
Tools/TestWebKitAPI/PlatformGTK.cmake
Tools/TestWebKitAPI/PlatformWin.cmake [new file with mode: 0644]
Tools/TestWebKitAPI/win/main.cpp
Tools/WinLauncher/CMakeLists.txt