Move IndexedDB to Network Process
[WebKit-https.git] / Source / WebKit / CMakeLists.txt
1 include(WebKitCommon)
2
3 set_property(DIRECTORY . PROPERTY FOLDER "WebKit")
4
5 set(WebKit_INCLUDE_DIRECTORIES
6     "${WEBKIT_DIR}"
7     "${WEBKIT_DIR}/NetworkProcess"
8     "${WEBKIT_DIR}/NetworkProcess/Cookies"
9     "${WEBKIT_DIR}/NetworkProcess/CustomProtocols"
10     "${WEBKIT_DIR}/NetworkProcess/Downloads"
11     "${WEBKIT_DIR}/NetworkProcess/FileAPI"
12     "${WEBKIT_DIR}/NetworkProcess/IndexedDB"
13     "${WEBKIT_DIR}/NetworkProcess/cache"
14     "${WEBKIT_DIR}/NetworkProcess/capture"
15     "${WEBKIT_DIR}/NetworkProcess/watchos"
16     "${WEBKIT_DIR}/NetworkProcess/webrtc"
17     "${WEBKIT_DIR}/Platform"
18     "${WEBKIT_DIR}/Platform/IPC"
19     "${WEBKIT_DIR}/PluginProcess"
20     "${WEBKIT_DIR}/Shared"
21     "${WEBKIT_DIR}/Shared/API"
22     "${WEBKIT_DIR}/Shared/API/c"
23     "${WEBKIT_DIR}/Shared/Authentication"
24     "${WEBKIT_DIR}/Shared/CoreIPCSupport"
25     "${WEBKIT_DIR}/Shared/Databases"
26     "${WEBKIT_DIR}/Shared/Databases/IndexedDB"
27     "${WEBKIT_DIR}/Shared/FileAPI"
28     "${WEBKIT_DIR}/Shared/Gamepad"
29     "${WEBKIT_DIR}/Shared/Plugins"
30     "${WEBKIT_DIR}/Shared/Plugins/Netscape"
31     "${WEBKIT_DIR}/Shared/Plugins/Netscape/x11"
32     "${WEBKIT_DIR}/Shared/RemoteLayerTree"
33     "${WEBKIT_DIR}/Shared/Storage"
34     "${WEBKIT_DIR}/Shared/WebsiteData"
35     "${WEBKIT_DIR}/StorageProcess"
36     "${WEBKIT_DIR}/StorageProcess/ServiceWorker"
37     "${WEBKIT_DIR}/UIProcess"
38     "${WEBKIT_DIR}/UIProcess/API"
39     "${WEBKIT_DIR}/UIProcess/API/C"
40     "${WEBKIT_DIR}/UIProcess/API/cpp"
41     "${WEBKIT_DIR}/UIProcess/ApplePay"
42     "${WEBKIT_DIR}/UIProcess/Authentication"
43     "${WEBKIT_DIR}/UIProcess/Automation"
44     "${WEBKIT_DIR}/UIProcess/Downloads"
45     "${WEBKIT_DIR}/UIProcess/Gamepad"
46     "${WEBKIT_DIR}/UIProcess/Launcher"
47     "${WEBKIT_DIR}/UIProcess/Network"
48     "${WEBKIT_DIR}/UIProcess/Network/CustomProtocols"
49     "${WEBKIT_DIR}/UIProcess/Notifications"
50     "${WEBKIT_DIR}/UIProcess/Plugins"
51     "${WEBKIT_DIR}/UIProcess/RemoteLayerTree"
52     "${WEBKIT_DIR}/UIProcess/Storage"
53     "${WEBKIT_DIR}/UIProcess/UserContent"
54     "${WEBKIT_DIR}/UIProcess/WebStorage"
55     "${WEBKIT_DIR}/UIProcess/WebsiteData"
56     "${WEBKIT_DIR}/WebProcess"
57     "${WEBKIT_DIR}/WebProcess/ApplePay"
58     "${WEBKIT_DIR}/WebProcess/ApplicationCache"
59     "${WEBKIT_DIR}/WebProcess/Automation"
60     "${WEBKIT_DIR}/WebProcess/Cache"
61     "${WEBKIT_DIR}/WebProcess/Databases"
62     "${WEBKIT_DIR}/WebProcess/Databases/IndexedDB"
63     "${WEBKIT_DIR}/WebProcess/FileAPI"
64     "${WEBKIT_DIR}/WebProcess/FullScreen"
65     "${WEBKIT_DIR}/WebProcess/Gamepad"
66     "${WEBKIT_DIR}/WebProcess/Geolocation"
67     "${WEBKIT_DIR}/WebProcess/IconDatabase"
68     "${WEBKIT_DIR}/WebProcess/InjectedBundle"
69     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API"
70     "${WEBKIT_DIR}/WebProcess/InjectedBundle/API/c"
71     "${WEBKIT_DIR}/WebProcess/InjectedBundle/DOM"
72     "${WEBKIT_DIR}/WebProcess/Launching"
73     "${WEBKIT_DIR}/WebProcess/MediaCache"
74     "${WEBKIT_DIR}/WebProcess/MediaStream"
75     "${WEBKIT_DIR}/WebProcess/Network"
76     "${WEBKIT_DIR}/WebProcess/Network/webrtc"
77     "${WEBKIT_DIR}/WebProcess/Notifications"
78     "${WEBKIT_DIR}/WebProcess/OriginData"
79     "${WEBKIT_DIR}/WebProcess/Plugins"
80     "${WEBKIT_DIR}/WebProcess/Plugins/Netscape"
81     "${WEBKIT_DIR}/WebProcess/ResourceCache"
82     "${WEBKIT_DIR}/WebProcess/Storage"
83     "${WEBKIT_DIR}/WebProcess/UserContent"
84     "${WEBKIT_DIR}/WebProcess/WebCoreSupport"
85     "${WEBKIT_DIR}/WebProcess/WebPage"
86     "${WEBKIT_DIR}/WebProcess/WebPage/RemoteLayerTree"
87     "${WEBKIT_DIR}/WebProcess/WebStorage"
88     "${DERIVED_SOURCES_WEBKIT_DIR}"
89     "${DERIVED_SOURCES_WEBKIT_DIR}/include"
90     "${CMAKE_SOURCE_DIR}/Source"
91     "${CMAKE_SOURCE_DIR}/WebKitLibraries"
92 )
93
94 set(PROTOCOL_GENERATOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
95
96 set(WebKit_SYSTEM_INCLUDE_DIRECTORIES
97     ${ICU_INCLUDE_DIRS}
98 )
99
100 list(APPEND WebKit_UNIFIED_SOURCE_LIST_FILES
101     "Sources.txt"
102 )
103
104 set(WebKit_MESSAGES_IN_FILES
105     NetworkProcess/Cookies/WebCookieManager.messages.in
106
107     NetworkProcess/NetworkConnectionToWebProcess.messages.in
108     NetworkProcess/NetworkContentRuleListManager.messages.in
109     NetworkProcess/NetworkProcess.messages.in
110     NetworkProcess/NetworkResourceLoader.messages.in
111     NetworkProcess/NetworkSocketStream.messages.in
112
113     NetworkProcess/IndexedDB/WebIDBConnectionToClient.messages.in
114
115     NetworkProcess/cache/CacheStorageEngineConnection.messages.in
116
117     NetworkProcess/webrtc/NetworkMDNSRegister.messages.in
118     NetworkProcess/webrtc/NetworkRTCMonitor.messages.in
119     NetworkProcess/webrtc/NetworkRTCProvider.messages.in
120     NetworkProcess/webrtc/NetworkRTCSocket.messages.in
121
122     PluginProcess/PluginControllerProxy.messages.in
123     PluginProcess/PluginProcess.messages.in
124     PluginProcess/WebProcessConnection.messages.in
125
126     Shared/ChildProcess.messages.in
127     Shared/WebConnection.messages.in
128
129     Shared/Authentication/AuthenticationManager.messages.in
130
131     Shared/Plugins/NPObjectMessageReceiver.messages.in
132
133     StorageProcess/StorageProcess.messages.in
134     StorageProcess/StorageToWebProcessConnection.messages.in
135
136     StorageProcess/ServiceWorker/WebSWServerConnection.messages.in
137     StorageProcess/ServiceWorker/WebSWServerToContextConnection.messages.in
138
139     UIProcess/DrawingAreaProxy.messages.in
140     UIProcess/RemoteWebInspectorProxy.messages.in
141     UIProcess/VisitedLinkStore.messages.in
142     UIProcess/WebCookieManagerProxy.messages.in
143     UIProcess/WebFullScreenManagerProxy.messages.in
144     UIProcess/WebGeolocationManagerProxy.messages.in
145     UIProcess/WebInspectorProxy.messages.in
146     UIProcess/WebPageProxy.messages.in
147     UIProcess/WebPasteboardProxy.messages.in
148     UIProcess/WebProcessPool.messages.in
149     UIProcess/WebProcessProxy.messages.in
150     UIProcess/WebResourceLoadStatisticsStore.messages.in
151
152     UIProcess/Automation/WebAutomationSession.messages.in
153
154     UIProcess/Downloads/DownloadProxy.messages.in
155
156     UIProcess/Network/NetworkProcessProxy.messages.in
157
158     UIProcess/Plugins/PluginProcessProxy.messages.in
159
160     UIProcess/Storage/StorageProcessProxy.messages.in
161
162     UIProcess/UserContent/WebUserContentControllerProxy.messages.in
163
164     UIProcess/WebStorage/StorageManager.messages.in
165
166     WebProcess/WebProcess.messages.in
167
168     WebProcess/Automation/WebAutomationSessionProxy.messages.in
169
170     WebProcess/Cache/WebCacheStorageConnection.messages.in
171
172     WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in
173
174     WebProcess/FullScreen/WebFullScreenManager.messages.in
175
176     WebProcess/Geolocation/WebGeolocationManager.messages.in
177
178     WebProcess/Network/webrtc/WebMDNSRegister.messages.in
179     WebProcess/Network/webrtc/WebRTCMonitor.messages.in
180     WebProcess/Network/webrtc/WebRTCResolver.messages.in
181     WebProcess/Network/webrtc/WebRTCSocket.messages.in
182
183     WebProcess/Network/NetworkProcessConnection.messages.in
184     WebProcess/Network/WebResourceLoader.messages.in
185     WebProcess/Network/WebSocketStream.messages.in
186
187     WebProcess/Notifications/WebNotificationManager.messages.in
188
189     WebProcess/Plugins/PluginProcessConnection.messages.in
190     WebProcess/Plugins/PluginProcessConnectionManager.messages.in
191     WebProcess/Plugins/PluginProxy.messages.in
192
193     WebProcess/Storage/ServiceWorkerClientFetch.messages.in
194     WebProcess/Storage/WebSWClientConnection.messages.in
195     WebProcess/Storage/WebSWContextManagerConnection.messages.in
196
197     WebProcess/UserContent/WebUserContentController.messages.in
198
199     WebProcess/WebPage/DrawingArea.messages.in
200     WebProcess/WebPage/EventDispatcher.messages.in
201     WebProcess/WebPage/RemoteWebInspectorUI.messages.in
202     WebProcess/WebPage/VisitedLinkTableController.messages.in
203     WebProcess/WebPage/WebInspector.messages.in
204     WebProcess/WebPage/WebInspectorInterruptDispatcher.messages.in
205     WebProcess/WebPage/WebInspectorUI.messages.in
206     WebProcess/WebPage/WebPage.messages.in
207
208     WebProcess/WebStorage/StorageAreaMap.messages.in
209 )
210
211 if (${WebCore_LIBRARY_TYPE} STREQUAL STATIC)
212     # Link with WebCore as PRIVATE not to propagate WebCore to all users of WebKit.
213     set(WebKit_LIBRARIES
214         PRIVATE WebCore
215         PUBLIC WebCoreHeaderInterface
216     )
217 else ()
218     # All users of WebKit need to link WebCore if WebCore is a shared library.
219     set(WebKit_LIBRARIES PUBLIC WebCore)
220 endif ()
221
222 set(WebProcess_LIBRARIES
223     WebKit
224 )
225
226 set(NetworkProcess_LIBRARIES
227     WebKit
228 )
229
230 set(StorageProcess_LIBRARIES
231     WebKit
232 )
233
234 set(PluginProcess_LIBRARIES
235     WebKit
236 )
237
238 if (ENABLE_GRAPHICS_CONTEXT_3D)
239     # For platforms that want to use system-provided OpenGL (ES) / EGL headers,
240     # these include directories, libraries or definitions need to be
241     # added before the ANGLE directories.
242     if (USE_LIBEPOXY)
243         list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
244             ${LIBEPOXY_INCLUDE_DIRS}
245         )
246         list(APPEND WebKit_LIBRARIES
247             PRIVATE ${LIBEPOXY_LIBRARIES}
248         )
249         add_definitions(${LIBEPOXY_DEFINITIONS})
250     else ()
251         if (USE_OPENGL)
252             list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
253                 ${OPENGL_INCLUDE_DIRS}
254             )
255             list(APPEND WebKit_LIBRARIES
256                 PRIVATE ${OPENGL_LIBRARIES}
257             )
258             add_definitions(${OPENGL_DEFINITIONS})
259         elseif (USE_OPENGL_ES)
260             list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
261                 ${OPENGLES2_INCLUDE_DIRS}
262             )
263             list(APPEND WebKit_LIBRARIES
264                 PRIVATE ${OPENGLES2_LIBRARIES}
265             )
266             add_definitions(${OPENGLES2_DEFINITIONS})
267         endif ()
268
269         if (USE_EGL)
270             list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
271                 ${EGL_INCLUDE_DIRS}
272             )
273             list(APPEND WebKit_LIBRARIES
274                 PRIVATE ${EGL_LIBRARIES}
275             )
276             add_definitions(${EGL_DEFINITIONS})
277         endif ()
278     endif ()
279
280     list(APPEND WebKit_INCLUDE_DIRECTORIES
281         "${THIRDPARTY_DIR}/ANGLE"
282         "${THIRDPARTY_DIR}/ANGLE/include/KHR"
283     )
284 endif ()
285
286 if (WIN32 AND INTERNAL_BUILD)
287     set(JavaScriptCore_SCRIPTS_DIR "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore/Scripts")
288 else ()
289     set(JavaScriptCore_SCRIPTS_DIR "${FORWARDING_HEADERS_DIR}/JavaScriptCore/Scripts")
290 endif ()
291
292 if (ATOMIC_INT64_REQUIRES_LIBATOMIC)
293     list(APPEND WebKit_LIBRARIES PRIVATE atomic)
294 endif ()
295
296 if (UNIX)
297     check_function_exists(shm_open SHM_OPEN_EXISTS)
298     if (NOT SHM_OPEN_EXISTS)
299         set(CMAKE_REQUIRED_LIBRARIES rt)
300         check_function_exists(shm_open SHM_OPEN_REQUIRES_LIBRT)
301         if (SHM_OPEN_REQUIRES_LIBRT)
302             list(APPEND WebKit_LIBRARIES PRIVATE rt)
303         endif ()
304         unset(CMAKE_REQUIRED_LIBRARIES)
305     endif ()
306 endif ()
307
308 macro(ADD_WEBKIT_PREFIX_HEADER _target)
309     if (WebKit_USE_PREFIX_HEADER)
310         get_target_property(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
311         if (${OLD_COMPILE_FLAGS} STREQUAL "OLD_COMPILE_FLAGS-NOTFOUND")
312             set(OLD_COMPILE_FLAGS "")
313         endif ()
314         set_target_properties(${_target} PROPERTIES COMPILE_FLAGS "${OLD_COMPILE_FLAGS} -include ${WEBKIT_DIR}/WebKit2Prefix.h")
315     endif ()
316 endmacro()
317
318 set(WebKit_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS
319 )
320
321 WEBKIT_FRAMEWORK_DECLARE(WebKit)
322 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
323
324 # Helper macro which wraps generate-message-receiver.py and generate-message-header.py scripts
325 #   _output_source is a list name which will contain generated sources.(eg. WebKit_SOURCES)
326 #   _input_files are messages.in files to generate.
327 macro(GENERATE_MESSAGE_SOURCES _output_source _input_files)
328     foreach (_file ${_input_files})
329         get_filename_component(_name ${_file} NAME_WE)
330         add_custom_command(
331             OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}MessageReceiver.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}Messages.h
332             MAIN_DEPENDENCY ${_file}
333             DEPENDS ${WEBKIT_DIR}/Scripts/webkit/__init__.py
334                     ${WEBKIT_DIR}/Scripts/webkit/messages.py
335                     ${WEBKIT_DIR}/Scripts/webkit/model.py
336                     ${WEBKIT_DIR}/Scripts/webkit/parser.py
337             COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-message-receiver.py ${_file} > ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}MessageReceiver.cpp
338             COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-messages-header.py ${_file} > ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}Messages.h
339             WORKING_DIRECTORY ${WEBKIT_DIR}
340             VERBATIM)
341
342         list(APPEND ${_output_source} ${DERIVED_SOURCES_WEBKIT_DIR}/${_name}MessageReceiver.cpp)
343     endforeach ()
344 endmacro()
345 GENERATE_MESSAGE_SOURCES(WebKit_DERIVED_SOURCES "${WebKit_MESSAGES_IN_FILES}")
346
347 set(WebKit_AUTOMATION_PROTOCOL_GENERATOR_SCRIPTS
348     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py
349     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/cpp_generator.py
350     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/cpp_generator_templates.py
351     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_header.py
352     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_implementation.py
353     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_header.py
354     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_implementation.py
355     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_header.py
356     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_implementation.py
357     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generator.py
358     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/generator_templates.py
359     ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/codegen/models.py
360 )
361
362 set(WebKit_AUTOMATION_PROTOCOL_GENERATOR_INPUTS
363     ${WEBKIT_DIR}/UIProcess/Automation/Automation.json
364 )
365
366 add_custom_command(
367     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationBackendDispatchers.h ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationBackendDispatchers.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationProtocolObjects.h ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationProtocolObjects.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationFrontendDispatchers.h ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationFrontendDispatchers.cpp
368     MAIN_DEPENDENCY ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
369     DEPENDS ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_SCRIPTS}
370     COMMAND ${PYTHON_EXECUTABLE} ${PROTOCOL_GENERATOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir "${DERIVED_SOURCES_WEBKIT_DIR}" --framework WebKit ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_EXTRA_FLAGS} --backend ${WebKit_AUTOMATION_PROTOCOL_GENERATOR_INPUTS}
371     VERBATIM)
372
373 list(APPEND WebKit_HEADERS
374     ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationBackendDispatchers.h
375     ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationFrontendDispatchers.h
376     ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationProtocolObjects.h
377 )
378
379 list(APPEND WebKit_SOURCES
380     ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationBackendDispatchers.cpp
381     ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationFrontendDispatchers.cpp
382     ${DERIVED_SOURCES_WEBKIT_DIR}/AutomationProtocolObjects.cpp
383 )
384
385 add_custom_command(
386     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxyScriptSource.h ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxy.min.js
387     MAIN_DEPENDENCY ${WEBKIT_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js
388     DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
389     COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__InjectedScript_WebAutomationSessionProxy.js" > ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxy.min.js
390     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${WEBKIT_DIR}/WebProcess/Automation/WebAutomationSessionProxy.js >> ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxy.min.js
391     COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl WebAutomationSessionProxyScriptSource ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxy.min.js ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxyScriptSource.h
392     VERBATIM)
393
394 list(APPEND WebKit_HEADERS
395     ${DERIVED_SOURCES_WEBKIT_DIR}/WebAutomationSessionProxyScriptSource.h
396 )
397
398 set(WebKit_WEB_PREFERENCES_TEMPLATES
399     ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb
400     ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
401     ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb
402     ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb
403     ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesKeys.cpp.erb
404     ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesKeys.h.erb
405     ${WEBKIT_DIR}/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
406 )
407
408 add_custom_command(
409     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebPageUpdatePreferences.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesExperimentalFeatures.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesInternalDebugFeatures.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesKeys.cpp ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesKeys.h ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesStoreDefaultsMap.cpp
410     MAIN_DEPENDENCY ${WEBKIT_DIR}/Shared/WebPreferences.yaml
411     DEPENDS ${WebKit_WEB_PREFERENCES_TEMPLATES}
412     COMMAND ${RUBY_EXECUTABLE} ${WEBKIT_DIR}/Scripts/GeneratePreferences.rb --input ${WEBKIT_DIR}/Shared/WebPreferences.yaml --outputDir "${DERIVED_SOURCES_WEBKIT_DIR}"
413     VERBATIM)
414
415 list(APPEND WebKit_HEADERS
416     ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesDefinitions.h
417     ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesKeys.h
418 )
419
420 list(APPEND WebKit_SOURCES
421     ${DERIVED_SOURCES_WEBKIT_DIR}/WebPageUpdatePreferences.cpp
422     ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesExperimentalFeatures.cpp
423     ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesInternalDebugFeatures.cpp
424     ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesKeys.cpp
425     ${DERIVED_SOURCES_WEBKIT_DIR}/WebPreferencesStoreDefaultsMap.cpp
426 )
427
428
429 list(APPEND WebKit_SOURCES ${WebKit_DERIVED_SOURCES})
430
431 WEBKIT_COMPUTE_SOURCES(WebKit)
432
433 WEBKIT_FRAMEWORK(WebKit)
434 add_dependencies(WebKit WebCore ${WEBKIT_EXTRA_DEPENDENCIES})
435 ADD_WEBKIT_PREFIX_HEADER(WebKit)
436
437 add_executable(WebProcess ${WebProcess_SOURCES})
438 ADD_WEBKIT_PREFIX_HEADER(WebProcess)
439 target_link_libraries(WebProcess ${WebProcess_LIBRARIES})
440
441 if (WebKit_WebProcess_OUTPUT_NAME)
442     set_target_properties(WebProcess PROPERTIES OUTPUT_NAME ${WebKit_WebProcess_OUTPUT_NAME})
443 endif ()
444
445 add_executable(NetworkProcess ${NetworkProcess_SOURCES})
446 ADD_WEBKIT_PREFIX_HEADER(NetworkProcess)
447 target_link_libraries(NetworkProcess ${NetworkProcess_LIBRARIES})
448
449 if (WebKit_NetworkProcess_OUTPUT_NAME)
450     set_target_properties(NetworkProcess PROPERTIES OUTPUT_NAME ${WebKit_NetworkProcess_OUTPUT_NAME})
451 endif ()
452
453 add_executable(StorageProcess ${StorageProcess_SOURCES})
454 ADD_WEBKIT_PREFIX_HEADER(StorageProcess)
455 target_link_libraries(StorageProcess ${StorageProcess_LIBRARIES})
456 install(TARGETS StorageProcess DESTINATION "${LIBEXEC_INSTALL_DIR}")
457
458 if (WebKit_StorageProcess_OUTPUT_NAME)
459     set_target_properties(StorageProcess PROPERTIES OUTPUT_NAME ${WebKit_StorageProcess_OUTPUT_NAME})
460 endif ()
461
462 if (COMPILER_IS_GCC_OR_CLANG)
463     WEBKIT_ADD_TARGET_CXX_FLAGS(WebKit -Wno-unused-parameter)
464     WEBKIT_ADD_TARGET_CXX_FLAGS(WebProcess -Wno-unused-parameter)
465     WEBKIT_ADD_TARGET_CXX_FLAGS(NetworkProcess -Wno-unused-parameter)
466     WEBKIT_ADD_TARGET_CXX_FLAGS(StorageProcess -Wno-unused-parameter)
467 endif ()
468
469 # FIXME: Mac should build a plugin process.
470 if (ENABLE_PLUGIN_PROCESS AND NOT "${PORT}" STREQUAL "Mac")
471     add_definitions(-DENABLE_PLUGIN_PROCESS=1)
472     add_executable(PluginProcess ${PluginProcess_SOURCES})
473     ADD_WEBKIT_PREFIX_HEADER(PluginProcess)
474     target_link_libraries(PluginProcess ${PluginProcess_LIBRARIES})
475     install(TARGETS PluginProcess DESTINATION "${LIBEXEC_INSTALL_DIR}")
476
477     if (COMPILER_IS_GCC_OR_CLANG)
478         WEBKIT_ADD_TARGET_CXX_FLAGS(PluginProcess -Wno-unused-parameter)
479     endif ()
480
481     if (WebKit_PluginProcess_OUTPUT_NAME)
482       set_target_properties(PluginProcess PROPERTIES OUTPUT_NAME ${WebKit_PluginProcess_OUTPUT_NAME})
483     endif ()
484 endif ()
485
486 if ("${PORT}" STREQUAL "Mac")
487     WEBKIT_DEFINE_XPC_SERVICES()
488 else ()
489     WEBKIT_POPULATE_LIBRARY_VERSION(WEBKIT)
490
491     set_target_properties(WebKit PROPERTIES VERSION ${WEBKIT_VERSION} SOVERSION ${WEBKIT_VERSION_MAJOR})
492
493     install(TARGETS WebKit WebProcess NetworkProcess
494         LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
495         RUNTIME DESTINATION "${LIBEXEC_INSTALL_DIR}"
496     )
497 endif ()