| include(GNUInstallDirs) |
| include(VersioningUtils) |
| |
| SET_PROJECT_VERSION(0 19 0) |
| set(WPE_API_VERSION 0.1) |
| |
| CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 1 0 0) |
| |
| # These are shared variables, but we special case their definition so that we can use the |
| # CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro. |
| set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory") |
| set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory") |
| set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/wpe-webkit-${WPE_API_VERSION}" CACHE PATH "Absolute path to install executables executed by the library") |
| |
| WEBKIT_OPTION_BEGIN() |
| |
| include(GStreamerDefinitions) |
| |
| # Public options shared with other WebKit ports. Do not add any options here |
| # without approval from a WPE reviewer. There must be strong reason to support |
| # changing the value of the option. |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS PUBLIC OFF) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ENCRYPTED_MEDIA PUBLIC ${ENABLE_EXPERIMENTAL_FEATURES}) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_JIT PUBLIC ON) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBDRIVER PUBLIC ON) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CRYPTO PUBLIC ON) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_XSLT PUBLIC ON) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC PUBLIC OFF) |
| |
| # Private options shared with other WebKit ports. Add options here only if |
| # we need a value different from the default defined in WebKitFeatures.cmake. |
| # Changing these options is completely unsupported. |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCESSIBILITY PRIVATE ON) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API PRIVATE OFF) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PRIVATE OFF) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NOTIFICATIONS PRIVATE OFF) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SERVICE_WORKER PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SMOOTH_SCROLLING PRIVATE OFF) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_TOUCH_EVENTS PRIVATE ON) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL2 PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) |
| |
| # Public options specific to the WPE port. Do not add any options here unless |
| # there is a strong reason we should support changing the value of the option, |
| # and the option is not relevant to any other WebKit ports. |
| WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON) |
| |
| # Private options specific to the WPE port. |
| WEBKIT_OPTION_DEFINE(USE_OPENVR "Whether to use OpenVR as WebVR backend." PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES}) |
| |
| if (CMAKE_SYSTEM_NAME MATCHES "Linux") |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE ON) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_USAGE PRIVATE ON) |
| else () |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER PRIVATE OFF) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_RESOURCE_USAGE PRIVATE OFF) |
| endif () |
| |
| SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE}) |
| if (DEVELOPER_MODE) |
| WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS PRIVATE ON) |
| endif () |
| |
| include(GStreamerDependencies) |
| |
| WEBKIT_OPTION_END() |
| |
| find_package(Cairo 1.10.2 REQUIRED) |
| find_package(Fontconfig 2.8.0 REQUIRED) |
| find_package(Freetype2 2.4.2 REQUIRED) |
| find_package(GLIB 2.40.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule) |
| find_package(HarfBuzz 0.9.18 REQUIRED) |
| find_package(ICU REQUIRED) |
| find_package(JPEG REQUIRED) |
| find_package(LibEpoxy 1.4.0 REQUIRED) |
| find_package(LibGcrypt 1.6.0 REQUIRED) |
| find_package(LibSoup 2.42.0 REQUIRED) |
| find_package(LibXml2 2.8.0 REQUIRED) |
| find_package(PNG REQUIRED) |
| find_package(Sqlite REQUIRED) |
| find_package(Threads REQUIRED) |
| find_package(WebP REQUIRED) |
| find_package(WPEBackend REQUIRED) |
| find_package(ZLIB REQUIRED) |
| |
| if (USE_WOFF2) |
| find_package(WOFF2Dec 1.0.2) |
| if (NOT WOFF2DEC_FOUND) |
| message(FATAL_ERROR "liwoff2dec is needed for USE_WOFF2.") |
| endif () |
| endif () |
| |
| if (ENABLE_ACCELERATED_2D_CANVAS) |
| find_package(CairoGL 1.10.2 REQUIRED COMPONENTS cairo-egl) |
| endif () |
| |
| if (ENABLE_SUBTLE_CRYPTO) |
| find_package(Libtasn1 REQUIRED) |
| if (NOT LIBTASN1_FOUND) |
| message(FATAL_ERROR "libtasn1 is required to enable Web Crypto API support.") |
| endif () |
| if (LIBGCRYPT_VERSION VERSION_LESS 1.7.0) |
| message(FATAL_ERROR "libgcrypt 1.7.0 is required to enable Web Crypto API support.") |
| endif () |
| endif () |
| |
| if (ENABLE_XSLT) |
| find_package(LibXslt 1.1.7 REQUIRED) |
| endif () |
| |
| add_definitions(-DBUILDING_WPE__=1) |
| add_definitions(-DGETTEXT_PACKAGE="WPE") |
| add_definitions(-DJSC_GLIB_API_ENABLED) |
| |
| SET_AND_EXPOSE_TO_BUILD(USE_CAIRO TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_EGL TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_GCRYPT TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_LIBEPOXY TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_XDGMIME TRUE) |
| |
| SET_AND_EXPOSE_TO_BUILD(ENABLE_GRAPHICS_CONTEXT_3D TRUE) |
| |
| SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_TILED_BACKING_STORE TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_COORDINATED_GRAPHICS TRUE) |
| SET_AND_EXPOSE_TO_BUILD(USE_COORDINATED_GRAPHICS_THREADED TRUE) |
| |
| set(FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders) |
| set(FORWARDING_HEADERS_WPE_DIR ${FORWARDING_HEADERS_DIR}/wpe) |
| set(FORWARDING_HEADERS_WPE_EXTENSION_DIR ${FORWARDING_HEADERS_DIR}/wpe-webextension) |
| set(FORWARDING_HEADERS_WPE_DOM_DIR ${FORWARDING_HEADERS_DIR}/wpe-dom) |
| set(DERIVED_SOURCES_JAVASCRIPCOREWPE_DIR ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/javascriptcorewpe) |
| set(DERIVED_SOURCES_JAVASCRIPCORE_GLIB_API_DIR ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/javascriptcorewpe/jsc) |
| set(DERIVED_SOURCES_WPE_API_DIR ${DERIVED_SOURCES_WEBKIT_DIR}/wpe) |
| |
| include(GStreamerChecks) |