forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlatformWin.cmake
144 lines (119 loc) · 3.34 KB
/
PlatformWin.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
set(wrapper_DEFINITIONS USE_CONSOLE_ENTRY_POINT)
if (${WTF_PLATFORM_WIN_CAIRO})
list(APPEND wrapper_DEFINITIONS WIN_CAIRO)
endif ()
set(test_main_SOURCES
win/main.cpp
)
# TestWTF
list(APPEND TestWTF_SOURCES
${test_main_SOURCES}
win/UtilitiesWin.cpp
)
WEBKIT_WRAP_EXECUTABLE(TestWTF
SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
LIBRARIES shlwapi
)
target_compile_definitions(TestWTF PRIVATE ${wrapper_DEFINITIONS})
set(TestWTF_OUTPUT_NAME TestWTF${DEBUG_SUFFIX})
# TestWebCore
list(APPEND TestWebCore_SOURCES
${test_main_SOURCES}
Tests/WebCore/win/DIBPixelData.cpp
Tests/WebCore/win/LinkedFonts.cpp
win/TestWebCoreStubs.cpp
)
list(APPEND TestWebCore_LIBRARIES
Crypt32
D2d1
Dwrite
Iphlpapi
Psapi
Shlwapi
Usp10
WindowsCodecs
dxguid
)
if (${WTF_PLATFORM_WIN_CAIRO})
list(APPEND TestWebCore_LIBRARIES
Cairo::Cairo
MediaFoundation
OpenSSL::SSL
mfuuid
strmiids
vcruntime
)
list(APPEND TestWebCore_SOURCES
Tests/WebCore/CryptoDigest.cpp
Tests/WebCore/curl/Cookies.cpp
Tests/WebCore/win/BitmapImage.cpp
)
else ()
list(APPEND TestWebCore_LIBRARIES
ASL${DEBUG_SUFFIX}
CFNetwork${DEBUG_SUFFIX}
CoreGraphics${DEBUG_SUFFIX}
CoreText${DEBUG_SUFFIX}
LibXslt::LibExslt
QuartzCore${DEBUG_SUFFIX}
WebKitQuartzCoreAdditions${DEBUG_SUFFIX}
libdispatch${DEBUG_SUFFIX}
)
endif ()
if (USE_CF)
list(APPEND TestWebCore_LIBRARIES
${COREFOUNDATION_LIBRARY}
)
endif ()
WEBKIT_WRAP_EXECUTABLE(TestWebCore
SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
LIBRARIES shlwapi
)
target_compile_definitions(TestWebCore PRIVATE ${wrapper_DEFINITIONS})
set(TestWebCore_OUTPUT_NAME TestWebCore${DEBUG_SUFFIX})
# TestWebKitLegacy
if (ENABLE_WEBKIT_LEGACY)
list(APPEND TestWebKitLegacy_SOURCES
${test_main_SOURCES}
Tests/WebKitLegacy/win/ScaleWebView.cpp
Tests/WebKitLegacy/win/WebViewDestruction.cpp
win/HostWindow.cpp
)
list(APPEND TestWebKitLegacy_LIBRARIES
WebKit::WTF
)
list(APPEND TestWebKitLegacy_PRIVATE_INCLUDE_DIRECTORIES
${TESTWEBKITAPI_DIR}/win
)
WEBKIT_WRAP_EXECUTABLE(TestWebKitLegacy
SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
LIBRARIES shlwapi
)
target_compile_definitions(TestWebKitLegacy PRIVATE ${wrapper_DEFINITIONS})
set(TestWebKitLegacy_OUTPUT_NAME TestWebKitLegacy${DEBUG_SUFFIX})
endif ()
# TestWebKit
if (ENABLE_WEBKIT)
target_sources(TestWebKitAPIInjectedBundle PRIVATE
win/PlatformUtilitiesWin.cpp
win/UtilitiesWin.cpp
)
list(APPEND TestWebKit_SOURCES
${test_main_SOURCES}
win/PlatformUtilitiesWin.cpp
win/PlatformWebViewWin.cpp
win/UtilitiesWin.cpp
)
if (${WTF_PLATFORM_WIN_CAIRO})
list(APPEND TestWebKit_SOURCES
Tests/WebKit/curl/Certificates.cpp
)
endif ()
WEBKIT_WRAP_EXECUTABLE(TestWebKit
SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
LIBRARIES shlwapi
)
target_compile_definitions(TestWebKit PRIVATE ${wrapper_DEFINITIONS})
set(TestWebKit_OUTPUT_NAME TestWebKit${DEBUG_SUFFIX})
endif ()