[CMake] Make WebCore headers copies
[WebKit-https.git] / Source / WebCore / PlatformWin.cmake
1 add_definitions(/bigobj -D__STDC_CONSTANT_MACROS)
2
3 list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
4     "${CMAKE_BINARY_DIR}/../include/private"
5     "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
6     "${WEBCORE_DIR}/accessibility/win"
7     "${WEBCORE_DIR}/page/win"
8     "${WEBCORE_DIR}/platform/graphics/egl"
9     "${WEBCORE_DIR}/platform/graphics/opengl"
10     "${WEBCORE_DIR}/platform/graphics/opentype"
11     "${WEBCORE_DIR}/platform/graphics/win"
12     "${WEBCORE_DIR}/platform/network/win"
13     "${WEBCORE_DIR}/platform/win"
14     "${THIRDPARTY_DIR}/ANGLE/include"
15     "${THIRDPARTY_DIR}/ANGLE/include/egl"
16     "${DERIVED_SOURCES_PAL_DIR}"
17 )
18
19 list(APPEND WebCore_SOURCES
20     accessibility/win/AXObjectCacheWin.cpp
21     accessibility/win/AccessibilityObjectWin.cpp
22     accessibility/win/AccessibilityObjectWrapperWin.cpp
23
24     editing/SmartReplaceCF.cpp
25     editing/win/EditorWin.cpp
26
27     html/HTMLSelectElementWin.cpp
28
29     page/win/DragControllerWin.cpp
30     page/win/EventHandlerWin.cpp
31     page/win/FrameWin.cpp
32
33     platform/Cursor.cpp
34     platform/LocalizedStrings.cpp
35     platform/StaticPasteboard.cpp
36
37     platform/audio/PlatformMediaSessionManager.cpp
38
39     platform/graphics/GraphicsContext3DPrivate.cpp
40
41     platform/graphics/egl/GLContextEGL.cpp
42
43     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
44     platform/graphics/opengl/Extensions3DOpenGLES.cpp
45     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
46     platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
47     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
48
49     platform/graphics/opentype/OpenTypeUtilities.cpp
50
51     platform/graphics/win/ColorDirect2D.cpp
52     platform/graphics/win/ComplexTextControllerDirectWrite.cpp
53     platform/graphics/win/DIBPixelData.cpp
54     platform/graphics/win/FloatPointDirect2D.cpp
55     platform/graphics/win/FloatRectDirect2D.cpp
56     platform/graphics/win/FloatSizeDirect2D.cpp
57     platform/graphics/win/FontCacheWin.cpp
58     platform/graphics/win/FontPlatformDataWin.cpp
59     platform/graphics/win/FontWin.cpp
60     platform/graphics/win/FullScreenController.cpp
61     platform/graphics/win/GraphicsContextWin.cpp
62     platform/graphics/win/IconWin.cpp
63     platform/graphics/win/ImageWin.cpp
64     platform/graphics/win/IntPointWin.cpp
65     platform/graphics/win/IntRectWin.cpp
66     platform/graphics/win/IntSizeWin.cpp
67     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
68     platform/graphics/win/SimpleFontDataWin.cpp
69     platform/graphics/win/TransformationMatrixDirect2D.cpp
70     platform/graphics/win/TransformationMatrixWin.cpp
71     platform/graphics/win/UniscribeController.cpp
72
73     platform/network/win/DownloadBundleWin.cpp
74     platform/network/win/NetworkStateNotifierWin.cpp
75
76     platform/text/LocaleNone.cpp
77
78     platform/win/BString.cpp
79     platform/win/BitmapInfo.cpp
80     platform/win/ClipboardUtilitiesWin.cpp
81     platform/win/CursorWin.cpp
82     platform/win/DefWndProcWindowClass.cpp
83     platform/win/DragDataWin.cpp
84     platform/win/DragImageWin.cpp
85     platform/win/EventLoopWin.cpp
86     platform/win/FileSystemWin.cpp
87     platform/win/GDIObjectCounter.cpp
88     platform/win/GDIUtilities.cpp
89     platform/win/KeyEventWin.cpp
90     platform/win/LocalizedStringsWin.cpp
91     platform/win/LoggingWin.cpp
92     platform/win/MIMETypeRegistryWin.cpp
93     platform/win/MainThreadSharedTimerWin.cpp
94     platform/win/PasteboardWin.cpp
95     platform/win/PathWalker.cpp
96     platform/win/PlatformMouseEventWin.cpp
97     platform/win/PlatformScreenWin.cpp
98     platform/win/PopupMenuWin.cpp
99     platform/win/SSLKeyGeneratorWin.cpp
100     platform/win/ScrollbarThemeWin.cpp
101     platform/win/SearchPopupMenuWin.cpp
102     platform/win/SharedBufferWin.cpp
103     platform/win/StructuredExceptionHandlerSuppressor.cpp
104     platform/win/SystemInfo.cpp
105     platform/win/WCDataObject.cpp
106     platform/win/WebCoreBundleWin.cpp
107     platform/win/WebCoreInstanceHandle.cpp
108     platform/win/WebCoreTextRenderer.cpp
109     platform/win/WheelEventWin.cpp
110     platform/win/WidgetWin.cpp
111     platform/win/WindowMessageBroadcaster.cpp
112
113     rendering/RenderThemeWin.cpp
114 )
115
116 list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
117     accessibility/win/AccessibilityObjectWrapperWin.h
118
119     page/win/FrameWin.h
120
121     platform/graphics/win/DIBPixelData.h
122     platform/graphics/win/FullScreenController.h
123     platform/graphics/win/FullScreenControllerClient.h
124     platform/graphics/win/LocalWindowsContext.h
125     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h
126     platform/graphics/win/SharedGDIObject.h
127
128     platform/win/BString.h
129     platform/win/BitmapInfo.h
130     platform/win/COMPtr.h
131     platform/win/DefWndProcWindowClass.h
132     platform/win/GDIObjectCounter.h
133     platform/win/GDIUtilities.h
134     platform/win/HWndDC.h
135     platform/win/PopupMenuWin.h
136     platform/win/SearchPopupMenuWin.h
137     platform/win/SystemInfo.h
138     platform/win/WCDataObject.h
139     platform/win/WebCoreBundleWin.h
140     platform/win/WebCoreInstanceHandle.h
141     platform/win/WebCoreTextRenderer.h
142     platform/win/WindowMessageBroadcaster.h
143     platform/win/WindowMessageListener.h
144     platform/win/WindowsTouch.h
145 )
146
147 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
148     ${WEBCORE_DIR}/css/themeWin.css
149     ${WEBCORE_DIR}/css/themeWinQuirks.css
150 )
151
152 if (USE_CF)
153     list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES
154         "${WEBCORE_DIR}/platform/cf"
155         "${WEBCORE_DIR}/platform/cf/win"
156     )
157
158     list(APPEND WebCore_SOURCES
159         loader/archive/cf/LegacyWebArchive.cpp
160
161         platform/cf/CFURLExtras.cpp
162         platform/cf/FileSystemCF.cpp
163         platform/cf/KeyedDecoderCF.cpp
164         platform/cf/KeyedEncoderCF.cpp
165         platform/cf/SharedBufferCF.cpp
166         platform/cf/URLCF.cpp
167
168         platform/cf/win/CertificateCFWin.cpp
169
170         platform/text/cf/HyphenationCF.cpp
171     )
172
173     list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
174         loader/archive/cf/LegacyWebArchive.h
175
176         platform/cf/CFURLExtras.h
177
178         platform/cf/win/CertificateCFWin.h
179     )
180 endif ()
181
182 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
183     list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
184     add_custom_command(
185         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
186         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
187         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
188         VERBATIM)
189 endif ()
190
191 if (${WTF_PLATFORM_WIN_CAIRO})
192     include(PlatformWinCairo.cmake)
193 else ()
194     include(PlatformAppleWin.cmake)
195 endif ()
196
197 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
198 file(COPY
199     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
200     "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
201     DESTINATION
202     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
203 )
204 file(COPY
205     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
206     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
207     DESTINATION
208     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
209 )
210 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem)
211     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
212     file(COPY
213         ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem
214         DESTINATION
215         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
216     )
217     file(RENAME
218         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cert.pem
219         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cacert.pem
220     )
221 endif ()
222
223 set(WebCore_OUTPUT_NAME
224     WebCore${DEBUG_SUFFIX}
225 )
226
227 list(APPEND WebCore_LIBRARIES WTF${DEBUG_SUFFIX})
228 if (TARGET libEGL)
229     list(APPEND WebCore_LIBRARIES libEGL)
230 endif ()
231 list(APPEND WebCoreTestSupport_LIBRARIES WTF${DEBUG_SUFFIX})