Web Inspector: Storage: values truncated in Local/Session table
[WebKit-https.git] / Source / cmake / OptionsPlayStation.cmake
1 set(PORT PlayStation)
2
3 include(Sign)
4
5 add_definitions(-DWTF_PLATFORM_PLAYSTATION=1)
6
7 WEBKIT_OPTION_BEGIN()
8
9 # Turn off JIT
10 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_JIT PRIVATE OFF)
11 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTL_JIT PRIVATE OFF)
12 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DFG_JIT PRIVATE OFF)
13
14 # Enabled features
15 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASYNC_SCROLLING PRIVATE ON)
16 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SMOOTH_SCROLLING PRIVATE ON)
17
18 # Experimental features
19 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_APPLICATION_MANIFEST PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
20 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS_PAINTING_API PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
21 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILTERS_LEVEL_2 PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
22 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
23 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VARIATION_FONTS PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
24 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
25
26 # Features to investigate
27 #
28 # Features that are temporarily turned off because an implementation is not
29 # present at this time
30 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PRIVATE OFF)
31 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_AUDIO PRIVATE OFF)
32
33 # No support planned
34 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
35 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PRIVATE OFF)
36 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ICONDATABASE PRIVATE OFF)
37 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER PRIVATE OFF)
38 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MATHML PRIVATE OFF)
39 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_METER_ELEMENT PRIVATE OFF)
40 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)
41 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NOTIFICATIONS PRIVATE OFF)
42 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SVG_FONTS PRIVATE OFF)
43 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USERSELECT_ALL PRIVATE OFF)
44 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USER_MESSAGE_HANDLERS PRIVATE OFF)
45 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CRYPTO PRIVATE OFF)
46 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_XSLT PRIVATE OFF)
47
48 WEBKIT_OPTION_END()
49
50 # Do not use a separate directory based on configuration when building
51 # with the Visual Studio generator
52 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
53 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
54 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
55 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
56 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
57 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
58
59 # Specify third party library directory
60 if (NOT WEBKIT_LIBRARIES_DIR)
61     if (DEFINED ENV{WEBKIT_LIBRARIES})
62         set(WEBKIT_LIBRARIES_DIR "$ENV{WEBKIT_LIBRARIES}" CACHE PATH "Path to PlayStationRequirements")
63     else ()
64         set(WEBKIT_LIBRARIES_DIR "${CMAKE_SOURCE_DIR}/WebKitLibraries/playstation" CACHE PATH "Path to PlayStationRequirements")
65     endif ()
66 endif ()
67
68 list(APPEND CMAKE_PREFIX_PATH ${WEBKIT_LIBRARIES_DIR})
69
70 find_library(C_STD_LIBRARY c)
71 find_library(KERNEL_LIBRARY kernel)
72 find_library(POSIX_COMPATABILITY_LIBRARY posixex)
73
74 find_package(Cairo REQUIRED)
75 find_package(CURL REQUIRED)
76 find_package(EGL REQUIRED)
77 find_package(Fontconfig REQUIRED)
78 find_package(Freetype REQUIRED)
79 find_package(HarfBuzz REQUIRED)
80 find_package(ICU REQUIRED)
81 find_package(JPEG REQUIRED)
82 find_package(LibPSL REQUIRED)
83 find_package(LibXml2 REQUIRED)
84 find_package(Nghttp2 REQUIRED)
85 find_package(OpenSSL REQUIRED)
86 find_package(Pixman REQUIRED)
87 find_package(PNG REQUIRED)
88 find_package(Sqlite REQUIRED)
89 find_package(Threads REQUIRED)
90 find_package(WebP REQUIRED)
91 find_package(WPE REQUIRED)
92 find_package(ZLIB REQUIRED)
93
94 # Emulate what pkg-config would do with statically compiled libraries
95 # FIXME: https://bugs.webkit.org/show_bug.cgi?id=192410
96 list(APPEND CAIRO_LIBRARIES ${PIXMAN_LIBRARIES})
97 list(APPEND CURL_LIBRARIES ${NGHTTP2_LIBRARIES})
98
99 # Temporarily turn off Accessibility support
100 SET_AND_EXPOSE_TO_BUILD(HAVE_ACCESSIBILITY OFF)
101
102 SET_AND_EXPOSE_TO_BUILD(HAVE_PTHREAD_SETNAME_NP ON)
103
104 SET_AND_EXPOSE_TO_BUILD(USE_EXPORT_MACROS ON)
105
106 SET_AND_EXPOSE_TO_BUILD(USE_CAIRO ON)
107 SET_AND_EXPOSE_TO_BUILD(USE_CURL ON)
108 SET_AND_EXPOSE_TO_BUILD(USE_FREETYPE ON)
109 SET_AND_EXPOSE_TO_BUILD(USE_HARFBUZZ ON)
110 SET_AND_EXPOSE_TO_BUILD(USE_LIBWPE ON)
111
112 # Rendering options
113 SET_AND_EXPOSE_TO_BUILD(ENABLE_GRAPHICS_CONTEXT_3D ON)
114 SET_AND_EXPOSE_TO_BUILD(USE_COORDINATED_GRAPHICS ON)
115 SET_AND_EXPOSE_TO_BUILD(USE_EGL ON)
116 SET_AND_EXPOSE_TO_BUILD(USE_NICOSIA TRUE)
117 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES ON)
118 SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER ON)
119 SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL ON)
120 SET_AND_EXPOSE_TO_BUILD(USE_TILED_BACKING_STORE ON)
121 SET_AND_EXPOSE_TO_BUILD(USE_UNIX_DOMAIN_SOCKETS ON)
122
123 set(WTF_LIBRARY_TYPE STATIC)
124 set(JavaScriptCore_LIBRARY_TYPE SHARED)
125 set(WebCore_LIBRARY_TYPE STATIC)
126
127 set(ENABLE_API_TESTS ON)
128 set(ENABLE_WEBCORE ON)
129 set(ENABLE_WEBKIT OFF)
130 set(ENABLE_WEBKIT_LEGACY OFF)
131
132 # Enable multi process builds for Visual Studio
133 if (NOT ${CMAKE_GENERATOR} MATCHES "Ninja")
134     add_definitions(/MP)
135 endif ()
136
137 find_library(DL_LIBRARY NAMES dl PATHS ${WEBKIT_LIBRARIES_DIR}/lib)
138 if (DL_LIBRARY)
139     add_link_options("$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:${DL_LIBRARY}>")
140     add_link_options("$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--wrap=dlopen>")
141     add_link_options("$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--wrap=dlclose>")
142     add_link_options("$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--wrap=dlerror>")
143     add_link_options("$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--wrap=dlsym>")
144 endif ()
145
146 function(add_library target type)
147     _add_library(${ARGV})
148     if ("${type}" STREQUAL "SHARED")
149         sign(${target})
150     endif ()
151 endfunction()
152
153 function(add_executable target)
154     _add_executable(${ARGV})
155     playstation_setup_libc(${target})
156     playstation_setup_fp(${target})
157     if (NOT ${target} MATCHES "^LLInt")
158         sign(${target})
159     endif ()
160     if (PLAYSTATION_${target}_WRAP)
161         foreach (WRAP ${PLAYSTATION_${target}_WRAP})
162             target_link_options(${target} PRIVATE -Wl,--wrap=${WRAP})
163         endforeach ()
164     endif ()
165 endfunction()