REGRESSION (r265515): fast/events/touch/ios/touch-events-with-modifiers.html is a...
[WebKit.git] / Source / PlatformGTK.cmake
1 include(GtkDoc)
2 include(WebKitDist)
3
4 add_subdirectory(${WEBCORE_DIR}/platform/gtk/po)
5
6 # This allows exposing a 'gir' target which builds all GObject introspection files.
7 if (ENABLE_INTROSPECTION)
8     add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets})
9 endif ()
10
11 list(APPEND DocumentationDependencies
12     WebKit
13     "${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
14     "${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-${WEBKITGTK_API_VERSION}-sections.txt"
15 )
16
17 if (ENABLE_GTKDOC)
18     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk-${WEBKITGTK_API_VERSION}/html/webkit2gtk-${WEBKITGTK_API_VERSION}
19             DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html"
20     )
21     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk-${WEBKITGTK_API_VERSION}/html/webkitdomgtk-${WEBKITGTK_API_VERSION}
22             DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html"
23     )
24     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/jsc-glib-${WEBKITGTK_API_VERSION}/html/jsc-glib-${WEBKITGTK_API_VERSION}
25             DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html"
26     )
27 endif ()
28
29 ADD_GTKDOC_GENERATOR("docs-build.stamp" "--gtk")
30 if (ENABLE_GTKDOC)
31     add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
32 elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING AND NOT APPLE)
33     add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
34
35     # Add a default build step which check that documentation does not have any warnings
36     # or errors. This is useful to prevent breaking documentation inadvertently during
37     # the course of development.
38     # FIXME: Add support for gtk-doc when building with GTK4.
39     if (DEVELOPER_MODE AND NOT USE_GTK4)
40         ADD_GTKDOC_GENERATOR("docs-build-no-html.stamp" "--gtk;--skip-html")
41         add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp")
42     endif ()
43 endif ()
44
45 add_custom_target(check
46     COMMAND ${TOOLS_DIR}/Scripts/run-gtk-tests
47     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
48     VERBATIM
49 )
50
51 if (DEVELOPER_MODE)
52     add_custom_target(Documentation DEPENDS gtkdoc)
53     WEBKIT_DECLARE_DIST_TARGETS(GTK webkitgtk ${TOOLS_DIR}/gtk/manifest.txt.in)
54 endif ()