[GTK] Remove the WebKitGTK+ WebKit 1 code
[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     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html/
13             DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk
14     )
15 endif ()
16
17 macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
18     add_custom_command(
19         OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
20         DEPENDS ${DocumentationDependencies}
21         COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
22         COMMAND touch ${_stamp_name}
23         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
24     )
25 endmacro()
26
27 add_gtkdoc_generator("docs-build-no-html.stamp" "--skip-html")
28 add_custom_target(gtkdoc-no-html ALL
29     DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp"
30 )
31
32 add_gtkdoc_generator("docs-build.stamp" "")
33 add_custom_target(gtkdoc
34     DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp"
35 )
36
37 add_custom_target(check
38     COMMAND ${TOOLS_DIR}/Scripts/run-gtk-tests
39     COMMAND ${TOOLS_DIR}/gtk/check-for-webkitdom-api-breaks
40 )
41
42 if (ENABLE_WEBKIT AND ENABLE_WEBKIT2)
43     add_custom_command(
44         OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
45         DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
46         DEPENDS ${TOOLS_DIR}/gtk/manifest.txt
47         DEPENDS WebKit2
48         DEPENDS gtkdoc
49         COMMAND ${TOOLS_DIR}/gtk/make-dist.py
50                 --source-dir=${CMAKE_SOURCE_DIR}
51                 --build-dir=${CMAKE_BINARY_DIR}
52                 --tarball-root=/webkitgtk-${PROJECT_VERSION}
53                 -o ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
54                 ${TOOLS_DIR}/gtk/manifest.txt
55     )
56
57     add_custom_command(
58         OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
59         DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
60         COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
61     )
62
63     add_custom_target(dist
64         DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
65     )
66 endif ()