4c85a42355a098fb9a4b195a09b4249f8459201b
[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 if (${WTF_PLATFORM_WIN_CAIRO})
6     add_definitions(-DWIN_CAIRO)
7 endif ()
8
9 set(test_main_SOURCES
10     ${TESTWEBKITAPI_DIR}/win/main.cpp
11 )
12
13 include_directories(
14     ${DERIVED_SOURCES_DIR}
15     ${DERIVED_SOURCES_DIR}/ForwardingHeaders
16     ${TESTWEBKITAPI_DIR}/win
17     ${DERIVED_SOURCES_DIR}/WebKit/Interfaces
18 )
19
20 add_definitions(-DWEBCORE_EXPORT=)
21
22 set(test_webcore_LIBRARIES
23     Crypt32
24     Iphlpapi
25     Shlwapi
26     Usp10
27     WebCore${DEBUG_SUFFIX}
28     WebKit${DEBUG_SUFFIX}
29     gtest
30 )
31
32 set(TestWebCoreLib_SOURCES
33     ${test_main_SOURCES}
34     ${TESTWEBKITAPI_DIR}/TestsController.cpp
35     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CalculationValue.cpp
36     ${TESTWEBKITAPI_DIR}/Tests/WebCore/CSSParser.cpp
37     ${TESTWEBKITAPI_DIR}/Tests/WebCore/LayoutUnit.cpp
38     ${TESTWEBKITAPI_DIR}/Tests/WebCore/TimeRanges.cpp
39     ${TESTWEBKITAPI_DIR}/Tests/WebCore/URL.cpp
40 )
41
42 if (${WTF_PLATFORM_WIN_CAIRO})
43     list(APPEND test_webcore_LIBRARIES
44         cairo
45         libANGLE
46         libeay32
47         mfuuid
48         ssleay32
49         strmiids
50         vcruntime
51     )
52     list(APPEND TestWebCoreLib_SOURCES
53         ${TESTWEBKITAPI_DIR}/Tests/WebCore/win/BitmapImage.cpp
54     )
55 else ()
56     list(APPEND test_webcore_LIBRARIES
57         ASL${DEBUG_SUFFIX}
58         AVFoundationCF${DEBUG_SUFFIX}
59         CFNetwork${DEBUG_SUFFIX}
60         CoreAudioToolbox${DEBUG_SUFFIX}
61         CoreFoundation${DEBUG_SUFFIX}
62         CoreGraphics${DEBUG_SUFFIX}
63         CoreMedia${DEBUG_SUFFIX}
64         CoreText${DEBUG_SUFFIX}
65         CoreVideo${DEBUG_SUFFIX}
66         MediaAccessibility${DEBUG_SUFFIX}
67         QuartzCore${DEBUG_SUFFIX}
68         SQLite3${DEBUG_SUFFIX}
69         WebKitSystemInterface${DEBUG_SUFFIX}
70         WebKitQuartzCoreAdditions${DEBUG_SUFFIX}
71         libdispatch${DEBUG_SUFFIX}
72         libexslt${DEBUG_SUFFIX}
73         libicuin${DEBUG_SUFFIX}
74         libicuuc${DEBUG_SUFFIX}
75         libxml2${DEBUG_SUFFIX}
76         libxslt${DEBUG_SUFFIX}
77         zdll${DEBUG_SUFFIX}
78     )
79 endif ()
80
81 add_library(TestWTFLib SHARED
82     ${test_main_SOURCES}
83     ${TestWTF_SOURCES}
84 )
85 set_target_properties(TestWTFLib PROPERTIES OUTPUT_NAME "TestWTF")
86 target_link_libraries(TestWTFLib ${test_wtf_LIBRARIES})
87
88 set(test_wtf_LIBRARIES
89     shlwapi
90 )
91 set(TestWTF_SOURCES
92 )
93
94 add_library(TestWebCoreLib SHARED
95     ${TestWebCoreLib_SOURCES}
96 )
97
98 target_link_libraries(TestWebCoreLib ${test_webcore_LIBRARIES})
99 set_target_properties(TestWebCoreLib PROPERTIES OUTPUT_NAME "TestWebCore")
100
101 add_executable(TestWebCore
102     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
103 )
104 target_link_libraries(TestWebCore shlwapi)
105
106
107 add_test(TestWebCore ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/TestWebCore)
108 set_tests_properties(TestWebCore PROPERTIES TIMEOUT 60)
109
110 add_library(TestWebKitLib SHARED
111     ${test_main_SOURCES}
112     ${TESTWEBKITAPI_DIR}/TestsController.cpp
113     ${TESTWEBKITAPI_DIR}/Tests/WebKit/win/WebViewDestruction.cpp
114     ${TESTWEBKITAPI_DIR}/win/HostWindow.cpp
115 )
116
117 target_link_libraries(TestWebKitLib ${test_webcore_LIBRARIES})
118 set_target_properties(TestWebKitLib PROPERTIES OUTPUT_NAME "TestWebKit")
119
120 add_executable(TestWebKit
121     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
122 )
123 target_link_libraries(TestWebKit shlwapi)
124
125 add_test(TestWebKit ${TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY}/TestWebKit)
126 set_tests_properties(TestWebKit PROPERTIES TIMEOUT 60)
127
128 set(test_main_SOURCES
129     ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
130 )