Unprefix CSS cursor values zoom-in and zoom-out.
[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 list(APPEND DocumentationDependencies
7     GObjectDOMBindings
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
13 if (ENABLE_GTKDOC)
14     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html/
15             DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk-${WEBKITGTK_API_VERSION}"
16     )
17     install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk/html/
18             DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkitdomgtk-${WEBKITGTK_API_VERSION}"
19     )
20 endif ()
21
22 macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
23     add_custom_command(
24         OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
25         DEPENDS ${DocumentationDependencies}
26         COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
27         COMMAND touch ${_stamp_name}
28         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
29     )
30 endmacro()
31
32 add_gtkdoc_generator("docs-build.stamp" "")
33 if (ENABLE_GTKDOC)
34     add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
35 else ()
36     add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
37
38     # Add a default build step which check that documentation does not have any warnings
39     # or errors. This is useful to prevent breaking documentation inadvertently during
40     # the course of development.
41     if (DEVELOPER_MODE)
42         add_gtkdoc_generator("docs-build-no-html.stamp" "--skip-html")
43         add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp")
44     endif ()
45 endif ()
46
47 add_custom_target(check
48     COMMAND ${TOOLS_DIR}/Scripts/run-gtk-tests
49     COMMAND ${TOOLS_DIR}/gtk/check-for-webkitdom-api-breaks
50 )
51
52
53 add_custom_command(
54     OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
55     DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
56     DEPENDS ${TOOLS_DIR}/gtk/manifest.txt
57     DEPENDS WebKit2
58     DEPENDS gtkdoc
59     COMMAND ${TOOLS_DIR}/gtk/make-dist.py
60             --source-dir=${CMAKE_SOURCE_DIR}
61             --build-dir=${CMAKE_BINARY_DIR}
62             --version=${PROJECT_VERSION}
63             ${TOOLS_DIR}/gtk/manifest.txt
64 )
65
66 add_custom_command(
67     OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
68     DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
69     COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
70 )
71
72 add_custom_target(dist
73     DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
74 )
75
76 add_custom_target(distcheck
77     DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
78     DEPENDS ${TOOLS_DIR}/gtk/manifest.txt
79     DEPENDS WebKit2
80     DEPENDS gtkdoc
81     COMMAND ${TOOLS_DIR}/gtk/make-dist.py
82             --check
83             --source-dir=${CMAKE_SOURCE_DIR}
84             --build-dir=${CMAKE_BINARY_DIR}
85             --version=/webkitgtk-${PROJECT_VERSION}
86             ${TOOLS_DIR}/gtk/manifest.txt
87     COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
88 )