Fix Debug CMake builds on Windows
[WebKit-https.git] / Tools / TestWebKitAPI / PlatformWin.cmake
1 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
2 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY_WTF "${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}")
3 add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
4
5 set(test_main_SOURCES
6     ${TESTWEBKITAPI_DIR}/win/main.cpp
7 )
8
9 include_directories(
10     ${DERIVED_SOURCES_DIR}
11     ${DERIVED_SOURCES_DIR}/ForwardingHeaders
12     ${TESTWEBKITAPI_DIR}/win
13 )
14
15 add_definitions(-DWEBCORE_EXPORT=)
16
17 set(test_webcore_LIBRARIES
18     Crypt32
19     Iphlpapi
20     Shlwapi
21     Usp10
22     WebCore
23     WebKit
24     gtest
25 )
26
27 set(TestWebCoreLib_SOURCES
28     ${test_main_SOURCES}
29     ${TESTWEBKITAPI_DIR}/TestsController.cpp
30     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CalculationValue.cpp
31     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CSSParser.cpp
32     ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp
33     ${TESTWEBKITAPI_DIR}/Tests/WebCore/TimeRanges.cpp
34     ${TESTWEBKITAPI_DIR}/Tests/WebCore/URL.cpp
35 )
36
37 if (${WTF_PLATFORM_WIN_CAIRO})
38     list(APPEND test_webcore_LIBRARIES
39         cairo
40         libANGLE
41         libeay32
42         mfuuid
43         ssleay32
44         strmiids
45         vcruntime
46     )
47     list(APPEND TestWebCoreLib_SOURCES
48         ${TESTWEBKITAPI_DIR}/Tests/WebCore/win/BitmapImage.cpp
49     )
50 else ()
51     list(APPEND test_webcore_LIBRARIES
52         CFNetwork
53         CoreMedia
54         WebKitSystemInterface
55     )
56 endif ()
57
58 add_library(TestWTFLib SHARED
59     ${test_main_SOURCES}
60     ${TestWTF_SOURCES}
61 )
62 set_target_properties(TestWTFLib PROPERTIES OUTPUT_NAME "TestWTF")
63 target_link_libraries(TestWTFLib ${test_wtf_LIBRARIES})
64
65 set(test_wtf_LIBRARIES
66     shlwapi
67 )
68 set(TestWTF_SOURCES
69 )
70
71 add_library(TestWebCoreLib SHARED
72     ${TestWebCoreLib_SOURCES}
73 )
74
75 target_link_libraries(TestWebCoreLib ${test_webcore_LIBRARIES})
76 set_target_properties(TestWebCoreLib PROPERTIES OUTPUT_NAME "TestWebCore")
77
78 add_executable(TestWebCore
79     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
80 )
81 target_link_libraries(TestWebCore shlwapi)
82
83
84 add_test(TestWebCore ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/TestWebCore)
85 set_tests_properties(TestWebCore PROPERTIES TIMEOUT 60)
86
87 add_library(TestWebKitLib SHARED
88     ${test_main_SOURCES}
89     ${TESTWEBKITAPI_DIR}/TestsController.cpp
90     ${TESTWEBKITAPI_DIR}/Tests/WebKit/win/WebViewDestruction.cpp
91     ${TESTWEBKITAPI_DIR}/win/HostWindow.cpp
92 )
93
94 target_link_libraries(TestWebKitLib ${test_webcore_LIBRARIES})
95 set_target_properties(TestWebKitLib PROPERTIES OUTPUT_NAME "TestWebKit")
96
97 add_executable(TestWebKit
98     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
99 )
100 target_link_libraries(TestWebKit shlwapi)
101
102 add_test(TestWebKit ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/TestWebKit)
103 set_tests_properties(TestWebKit PROPERTIES TIMEOUT 60)
104
105 set(test_main_SOURCES
106     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
107 )