6d3d9b4ad21931c0eeb921c0b1936c79e693ba1b
[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 if (${WTF_PLATFORM_WIN_CAIRO})
28     list(APPEND test_webcore_LIBRARIES
29         cairo
30         libANGLE
31         libeay32
32         mfuuid
33         ssleay32
34         strmiids
35         vcruntime
36     )
37 else ()
38     list(APPEND test_webcore_LIBRARIES
39         CFNetwork
40         CoreMedia
41         WebKitSystemInterface
42     )
43 endif ()
44
45 add_library(TestWTFLib SHARED
46     ${test_main_SOURCES}
47     ${TestWTF_SOURCES}
48 )
49 set_target_properties(TestWTFLib PROPERTIES OUTPUT_NAME "TestWTF")
50 target_link_libraries(TestWTFLib ${test_wtf_LIBRARIES})
51
52 set(test_wtf_LIBRARIES
53     shlwapi
54 )
55 set(TestWTF_SOURCES
56 )
57
58 add_library(TestWebCoreLib SHARED
59     ${test_main_SOURCES}
60     ${TESTWEBKITAPI_DIR}/TestsController.cpp
61     ${TESTWEBKITAPI_DIR}/Tests/WebCore/win/BitmapImage.cpp
62     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CalculationValue.cpp
63     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CSSParser.cpp
64     ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp
65     ${TESTWEBKITAPI_DIR}/Tests/WebCore/TimeRanges.cpp
66     ${TESTWEBKITAPI_DIR}/Tests/WebCore/URL.cpp
67 )
68
69 target_link_libraries(TestWebCoreLib ${test_webcore_LIBRARIES})
70 set_target_properties(TestWebCoreLib PROPERTIES OUTPUT_NAME "TestWebCore")
71
72 add_executable(TestWebCore
73     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
74 )
75 target_link_libraries(TestWebCore shlwapi)
76
77
78 add_test(TestWebCore ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/TestWebCore)
79 set_tests_properties(TestWebCore PROPERTIES TIMEOUT 60)
80
81 add_library(TestWebKitLib SHARED
82     ${test_main_SOURCES}
83     ${TESTWEBKITAPI_DIR}/TestsController.cpp
84     ${TESTWEBKITAPI_DIR}/Tests/WebKit/win/WebViewDestruction.cpp
85     ${TESTWEBKITAPI_DIR}/win/HostWindow.cpp
86 )
87
88 target_link_libraries(TestWebKitLib ${test_webcore_LIBRARIES})
89 set_target_properties(TestWebKitLib PROPERTIES OUTPUT_NAME "TestWebKit")
90
91 add_executable(TestWebKit
92     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
93 )
94 target_link_libraries(TestWebKit shlwapi)
95
96 add_test(TestWebKit ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/TestWebKit)
97 set_tests_properties(TestWebKit PROPERTIES TIMEOUT 60)
98
99 set(test_main_SOURCES
100     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
101 )