mcatanzaro@igalia.com | e836b66 | 2017-11-03 18:42:55 +0000 | [diff] [blame] | 1 | include(WebKitDist) |
| 2 | |
mrobinson@webkit.org | a91ef60 | 2013-12-29 18:51:26 +0000 | [diff] [blame] | 3 | add_subdirectory(${WEBCORE_DIR}/platform/gtk/po) |
| 4 | |
mrobinson@webkit.org | d3a1986 | 2013-12-30 18:44:31 +0000 | [diff] [blame] | 5 | # This allows exposing a 'gir' target which builds all GObject introspection files. |
carlosgc@webkit.org | adc1b45 | 2014-11-01 09:55:47 +0000 | [diff] [blame] | 6 | if (ENABLE_INTROSPECTION) |
| 7 | add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets}) |
| 8 | endif () |
mrobinson@webkit.org | d3a1986 | 2013-12-30 18:44:31 +0000 | [diff] [blame] | 9 | |
commit-queue@webkit.org | 676092b | 2014-09-17 09:29:31 +0000 | [diff] [blame] | 10 | list(APPEND DocumentationDependencies |
mcatanzaro@igalia.com | d0d3e86 | 2017-09-19 00:29:31 +0000 | [diff] [blame] | 11 | WebKit |
matthew_hanson@apple.com | 3dab058 | 2017-07-14 02:29:22 +0000 | [diff] [blame] | 12 | "${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml" |
| 13 | "${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-${WEBKITGTK_API_VERSION}-sections.txt" |
commit-queue@webkit.org | 676092b | 2014-09-17 09:29:31 +0000 | [diff] [blame] | 14 | ) |
mrobinson@webkit.org | 5c89df9 | 2014-05-11 02:14:09 +0000 | [diff] [blame] | 15 | |
| 16 | if (ENABLE_GTKDOC) |
carlosgc@webkit.org | 38ec27b | 2018-04-20 10:33:30 +0000 | [diff] [blame] | 17 | install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk-${WEBKITGTK_API_VERSION}/html/webkit2gtk-${WEBKITGTK_API_VERSION} |
commit-queue@webkit.org | 3062a4c | 2018-05-10 06:44:00 +0000 | [diff] [blame] | 18 | DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html" |
mrobinson@webkit.org | 742e8e4 | 2014-01-06 00:25:34 +0000 | [diff] [blame] | 19 | ) |
carlosgc@webkit.org | 38ec27b | 2018-04-20 10:33:30 +0000 | [diff] [blame] | 20 | install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk-${WEBKITGTK_API_VERSION}/html/webkitdomgtk-${WEBKITGTK_API_VERSION} |
commit-queue@webkit.org | 3062a4c | 2018-05-10 06:44:00 +0000 | [diff] [blame] | 21 | DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html" |
carlosgc@webkit.org | ddf70dc | 2014-08-14 10:31:39 +0000 | [diff] [blame] | 22 | ) |
carlosgc@webkit.org | 38ec27b | 2018-04-20 10:33:30 +0000 | [diff] [blame] | 23 | install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/jsc-glib-${WEBKITGTK_API_VERSION}/html/jsc-glib-${WEBKITGTK_API_VERSION} |
commit-queue@webkit.org | 3062a4c | 2018-05-10 06:44:00 +0000 | [diff] [blame] | 24 | DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html" |
carlosgc@webkit.org | 38ec27b | 2018-04-20 10:33:30 +0000 | [diff] [blame] | 25 | ) |
mrobinson@webkit.org | 80a4d2e | 2013-12-23 21:49:43 +0000 | [diff] [blame] | 26 | endif () |
gns@gnome.org | e4caf1a | 2013-12-23 22:01:12 +0000 | [diff] [blame] | 27 | |
mrobinson@webkit.org | 6b6e5d4 | 2014-03-10 18:35:55 +0000 | [diff] [blame] | 28 | macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args) |
| 29 | add_custom_command( |
| 30 | OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}" |
| 31 | DEPENDS ${DocumentationDependencies} |
mcatanzaro@igalia.com | 8b224d4 | 2017-08-08 15:03:48 +0000 | [diff] [blame] | 32 | COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args} |
mrobinson@webkit.org | 6b6e5d4 | 2014-03-10 18:35:55 +0000 | [diff] [blame] | 33 | COMMAND touch ${_stamp_name} |
| 34 | WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" |
mcatanzaro@igalia.com | 8b224d4 | 2017-08-08 15:03:48 +0000 | [diff] [blame] | 35 | VERBATIM |
mrobinson@webkit.org | 6b6e5d4 | 2014-03-10 18:35:55 +0000 | [diff] [blame] | 36 | ) |
| 37 | endmacro() |
| 38 | |
mcatanzaro@igalia.com | d0d3e86 | 2017-09-19 00:29:31 +0000 | [diff] [blame] | 39 | ADD_GTKDOC_GENERATOR("docs-build.stamp" "") |
mrobinson@webkit.org | 5c89df9 | 2014-05-11 02:14:09 +0000 | [diff] [blame] | 40 | if (ENABLE_GTKDOC) |
| 41 | add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") |
philn@webkit.org | 6eb1cba | 2015-12-30 08:31:15 +0000 | [diff] [blame] | 42 | elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING AND NOT APPLE) |
mrobinson@webkit.org | 5c89df9 | 2014-05-11 02:14:09 +0000 | [diff] [blame] | 43 | add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp") |
| 44 | |
| 45 | # Add a default build step which check that documentation does not have any warnings |
| 46 | # or errors. This is useful to prevent breaking documentation inadvertently during |
| 47 | # the course of development. |
| 48 | if (DEVELOPER_MODE) |
mcatanzaro@igalia.com | d0d3e86 | 2017-09-19 00:29:31 +0000 | [diff] [blame] | 49 | ADD_GTKDOC_GENERATOR("docs-build-no-html.stamp" "--skip-html") |
mrobinson@webkit.org | 5c89df9 | 2014-05-11 02:14:09 +0000 | [diff] [blame] | 50 | add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp") |
| 51 | endif () |
| 52 | endif () |
gns@gnome.org | e4caf1a | 2013-12-23 22:01:12 +0000 | [diff] [blame] | 53 | |
mrobinson@webkit.org | 19bfa3f | 2014-01-14 00:42:25 +0000 | [diff] [blame] | 54 | add_custom_target(check |
mrobinson@webkit.org | aac040c | 2014-03-04 18:43:54 +0000 | [diff] [blame] | 55 | COMMAND ${TOOLS_DIR}/Scripts/run-gtk-tests |
mcatanzaro@igalia.com | f313291 | 2018-04-24 01:07:57 +0000 | [diff] [blame] | 56 | WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" |
| 57 | VERBATIM |
mrobinson@webkit.org | 19bfa3f | 2014-01-14 00:42:25 +0000 | [diff] [blame] | 58 | ) |
mrobinson@webkit.org | d497a99 | 2014-01-30 22:34:15 +0000 | [diff] [blame] | 59 | |
commit-queue@webkit.org | b9cdb3e | 2015-01-19 21:58:05 +0000 | [diff] [blame] | 60 | if (DEVELOPER_MODE) |
mcatanzaro@igalia.com | e836b66 | 2017-11-03 18:42:55 +0000 | [diff] [blame] | 61 | add_custom_target(Documentation DEPENDS gtkdoc) |
| 62 | WEBKIT_DECLARE_DIST_TARGETS(GTK webkitgtk ${TOOLS_DIR}/gtk/manifest.txt.in) |
commit-queue@webkit.org | b9cdb3e | 2015-01-19 21:58:05 +0000 | [diff] [blame] | 63 | endif () |