forked from haiku/haikuwebkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlatformHaiku.cmake
142 lines (123 loc) · 5.32 KB
/
PlatformHaiku.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
add_custom_command(
OUTPUT ${WebKitLegacy_DERIVED_SOURCES_DIR}/WebKitVersion.h
MAIN_DEPENDENCY ${WEBKITLEGACY_DIR}/scripts/generate-webkitversion.pl
DEPENDS ${WEBKITLEGACY_DIR}/mac/Configurations/Version.xcconfig
COMMAND ${PERL_EXECUTABLE} ${WEBKITLEGACY_DIR}/scripts/generate-webkitversion.pl --config ${WEBKITLEGACY_DIR}/mac/Configurations/Version.xcconfig --outputDir ${WebKitLegacy_DERIVED_SOURCES_DIR}
VERBATIM)
list(APPEND WebKitLegacy_SOURCES ${WebKitLegacy_DERIVED_SOURCES_DIR}/WebKitVersion.h)
LIST(APPEND WebKitLegacy_INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/Source"
"${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
"${WEBKITLEGACY_DIR}/Storage"
"${WEBKITLEGACY_DIR}/haiku"
"${WEBKITLEGACY_DIR}/haiku/API"
"${WEBKITLEGACY_DIR}/haiku/WebCoreSupport"
"${WTF_DIR}"
"${LIBXML2_INCLUDE_DIR}"
"${LIBXSLT_INCLUDE_DIR}"
"${SQLITE_INCLUDE_DIR}"
"${CMAKE_BINARY_DIR}"
"${FORWARDING_HEADERS_DIR}"
/system/develop/headers/private/netservices
)
# These folders have includes with the same name as Haiku system ones. So we
# add them with -iquote only, as a way to reach the Haiku includes with
# #include <>
SET(WebKitLegacy_LOCAL_INCLUDE_DIRECTORIES
"${FORWARDING_HEADERS_DIR}/WebCore"
"${WEBCORE_DIR}/Modules/notifications" # Notification.h
"${WEBCORE_DIR}/platform/text" # DateTimeFormat.h
)
foreach(inc ${WebKitLegacy_LOCAL_INCLUDE_DIRECTORIES})
ADD_DEFINITIONS(-iquote ${inc})
endforeach(inc)
IF (ENABLE_VIDEO_TRACK)
LIST(APPEND WebKitLegacy_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/html/track"
)
ENDIF ()
IF (ENABLE_NOTIFICATIONS)
LIST(APPEND WebKitLegacy_LOCAL_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/Modules/notifications"
)
ENDIF ()
add_definitions("-include WebKitPrefix.h")
LIST(APPEND WebKitLegacy_SOURCES
haiku/WebCoreSupport/BackForwardList.cpp
haiku/WebCoreSupport/ChromeClientHaiku.cpp
haiku/WebCoreSupport/ContextMenuClientHaiku.cpp
haiku/WebCoreSupport/DragClientHaiku.cpp
haiku/WebCoreSupport/DumpRenderTreeSupportHaiku.cpp
haiku/WebCoreSupport/EditorClientHaiku.cpp
haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
haiku/WebCoreSupport/FrameNetworkingContextHaiku.cpp
haiku/WebCoreSupport/IconDatabase.cpp
haiku/WebCoreSupport/InspectorClientHaiku.cpp
haiku/WebCoreSupport/NotificationClientHaiku.cpp
haiku/WebCoreSupport/PlatformStrategiesHaiku.cpp
haiku/WebCoreSupport/ProgressTrackerHaiku.cpp
haiku/WebCoreSupport/WebApplicationCache.cpp
haiku/WebCoreSupport/WebDatabaseProvider.cpp
haiku/WebCoreSupport/WebDiagnosticLoggingClient.cpp
haiku/WebCoreSupport/WebVisitedLinkStore.cpp
haiku/API/WebDownload.cpp
haiku/API/WebDownloadPrivate.cpp
haiku/API/WebFrame.cpp
haiku/API/WebKitInfo.cpp
haiku/API/WebPage.cpp
haiku/API/WebSettings.cpp
haiku/API/WebSettingsPrivate.cpp
haiku/API/WebView.cpp
haiku/API/WebWindow.cpp
Storage/StorageAreaImpl.cpp
Storage/StorageAreaSync.cpp
Storage/StorageNamespaceImpl.cpp
Storage/StorageSyncManager.cpp
Storage/StorageThread.cpp
Storage/StorageTracker.cpp
Storage/WebDatabaseProvider.cpp
Storage/WebStorageNamespaceProvider.cpp
)
LIST(APPEND WebKitLegacy_LIBRARIES
${LIBXML2_LIBRARIES}
${SQLITE_LIBRARIES}
${PNG_LIBRARY}
${JPEG_LIBRARY}
${CMAKE_DL_LIBS}
be bnetapi GL shared translation tracker
WebCore WTF
)
INSTALL(FILES
haiku/API/WebWindow.h
haiku/API/WebViewConstants.h
haiku/API/WebView.h
haiku/API/WebSettings.h
haiku/API/WebPage.h
haiku/API/WebKitInfo.h
haiku/API/WebFrame.h
haiku/API/WebDownload.h
DESTINATION develop/headers${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR}
COMPONENT devel
)
set(WebKitLegacy_WEB_PREFERENCES_TEMPLATES
${WEBKITLEGACY_DIR}/haiku/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
${WEBKITLEGACY_DIR}/haiku/Scripts/PreferencesTemplates/WebSettingsPrivateGenerated.cpp.erb
)
set(WebKitLegacy_WEB_PREFERENCES
${WTF_SCRIPTS_DIR}/Preferences/WebPreferences.yaml
${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml
${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml
${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml
)
set_source_files_properties(${WebKitLegacy_WEB_PREFERENCES} PROPERTIES GENERATED TRUE)
add_custom_command(
OUTPUT
${WebKitLegacy_DERIVED_SOURCES_DIR}/WebSettingsPrivateGenerated.cpp
${WebKitLegacy_DERIVED_SOURCES_DIR}/WebPreferencesDefinitions.h
DEPENDS ${WebKitLegacy_WEB_PREFERENCES_TEMPLATES} ${WebKitLegacy_WEB_PREFERENCES} WTF_CopyPreferences
COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/GeneratePreferences.rb --frontend WebKitLegacy --base ${WTF_SCRIPTS_DIR}/Preferences/WebPreferences.yaml --debug ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesDebug.yaml --experimental ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesExperimental.yaml --internal ${WTF_SCRIPTS_DIR}/Preferences/WebPreferencesInternal.yaml --outputDir "${WebKitLegacy_DERIVED_SOURCES_DIR}" --template ${WEBKITLEGACY_DIR}/haiku/Scripts/PreferencesTemplates/WebSettingsPrivateGenerated.cpp.erb --template ${WEBKITLEGACY_DIR}/haiku/Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb
VERBATIM)
list(APPEND WebKitLegacy_SOURCES
${WebKitLegacy_DERIVED_SOURCES_DIR}/WebSettingsPrivateGenerated.cpp
)
list(APPEND WebKitLegacy_SOURCES ${WebKitLegacy_INCLUDES} ${WebKitLegacy_SOURCES_Classes} ${WebKitLegacy_SOURCES_WebCoreSupport})