Generate isMathMLFoo() toMathMLFoo() by using NODE_TYPE_CASTS macro and generateTypeH...
[WebKit-https.git] / Source / PlatformGTK.cmake
1 add_subdirectory(${WEBCORE_DIR}/platform/gtk/po)
2
3 # This allows exposing a 'gir' target which builds all GObject introspection files.
4 add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets})
5
6 if (ENABLE_WEBKIT2)
7     list(APPEND DocumentationDependencies
8         WebKit2
9         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
10         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
11     )
12 endif ()
13
14 if (ENABLE_GTKDOC)
15     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html/
16             DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk
17     )
18 endif ()
19
20 macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
21     add_custom_command(
22         OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
23         DEPENDS ${DocumentationDependencies}
24         COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
25         COMMAND touch ${_stamp_name}
26         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
27     )
28 endmacro()
29
30 add_gtkdoc_generator("docs-build.stamp" "")
31 if (ENABLE_GTKDOC)
32     add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
33 else ()
34     add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
35
36     # Add a default build step which check that documentation does not have any warnings
37     # or errors. This is useful to prevent breaking documentation inadvertently during
38     # the course of development.
39     if (DEVELOPER_MODE)
40         add_gtkdoc_generator("docs-build-no-html.stamp" "--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     COMMAND ${TOOLS_DIR}/gtk/check-for-webkitdom-api-breaks
48 )
49
50 if (ENABLE_WEBKIT2)
51     add_custom_command(
52         OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
53         DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
54         DEPENDS ${TOOLS_DIR}/gtk/manifest.txt
55         DEPENDS WebKit2
56         DEPENDS gtkdoc
57         COMMAND ${TOOLS_DIR}/gtk/make-dist.py
58                 --source-dir=${CMAKE_SOURCE_DIR}
59                 --build-dir=${CMAKE_BINARY_DIR}
60                 --tarball-root=/webkitgtk-${PROJECT_VERSION}
61                 -o ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
62                 ${TOOLS_DIR}/gtk/manifest.txt
63     )
64
65     add_custom_command(
66         OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
67         DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
68         COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
69     )
70
71     add_custom_target(dist
72         DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
73     )
74 endif ()