2018-12-04 16:33:22 +00:00
|
|
|
include(GtkDoc)
|
2017-11-03 18:42:55 +00:00
|
|
|
include(WebKitDist)
|
|
|
|
|
2013-12-29 18:51:26 +00:00
|
|
|
add_subdirectory(${WEBCORE_DIR}/platform/gtk/po)
|
|
|
|
|
2013-12-30 18:44:31 +00:00
|
|
|
# This allows exposing a 'gir' target which builds all GObject introspection files.
|
2014-11-01 09:55:47 +00:00
|
|
|
if (ENABLE_INTROSPECTION)
|
|
|
|
add_custom_target(gir ALL DEPENDS ${GObjectIntrospectionTargets})
|
|
|
|
endif ()
|
2013-12-30 18:44:31 +00:00
|
|
|
|
2014-09-17 09:29:31 +00:00
|
|
|
list(APPEND DocumentationDependencies
|
2017-09-19 00:29:31 +00:00
|
|
|
WebKit
|
2017-07-14 02:29:22 +00:00
|
|
|
"${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
|
2021-03-12 09:31:00 +00:00
|
|
|
"${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-${WEBKITGTK_API_DOC_VERSION}-sections.txt"
|
2014-09-17 09:29:31 +00:00
|
|
|
)
|
2014-05-11 02:14:09 +00:00
|
|
|
|
|
|
|
if (ENABLE_GTKDOC)
|
2021-05-14 10:22:29 +00:00
|
|
|
install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk-${WEBKITGTK_API_DOC_VERSION}/html/webkit2gtk-${WEBKITGTK_API_DOC_VERSION}
|
2018-05-10 06:44:00 +00:00
|
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html"
|
2014-01-06 00:25:34 +00:00
|
|
|
)
|
2021-05-14 10:22:29 +00:00
|
|
|
install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk-${WEBKITGTK_API_DOC_VERSION}/html/webkitdomgtk-${WEBKITGTK_API_DOC_VERSION}
|
2018-05-10 06:44:00 +00:00
|
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html"
|
2014-08-14 10:31:39 +00:00
|
|
|
)
|
2021-05-14 10:22:29 +00:00
|
|
|
install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/jsc-glib-${WEBKITGTK_API_DOC_VERSION}/html/jsc-glib-${WEBKITGTK_API_DOC_VERSION}
|
2018-05-10 06:44:00 +00:00
|
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html"
|
2018-04-20 10:33:30 +00:00
|
|
|
)
|
2013-12-23 22:01:12 +00:00
|
|
|
endif ()
|
|
|
|
|
2018-12-04 16:33:22 +00:00
|
|
|
ADD_GTKDOC_GENERATOR("docs-build.stamp" "--gtk")
|
2014-05-11 02:14:09 +00:00
|
|
|
if (ENABLE_GTKDOC)
|
|
|
|
add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
|
2015-12-30 08:31:15 +00:00
|
|
|
elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING AND NOT APPLE)
|
2014-05-11 02:14:09 +00:00
|
|
|
add_custom_target(gtkdoc DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
|
|
|
|
|
|
|
|
# Add a default build step which check that documentation does not have any warnings
|
|
|
|
# or errors. This is useful to prevent breaking documentation inadvertently during
|
|
|
|
# the course of development.
|
2020-04-15 12:28:39 +00:00
|
|
|
# FIXME: Add support for gtk-doc when building with GTK4.
|
|
|
|
if (DEVELOPER_MODE AND NOT USE_GTK4)
|
2018-12-04 16:33:22 +00:00
|
|
|
ADD_GTKDOC_GENERATOR("docs-build-no-html.stamp" "--gtk;--skip-html")
|
2014-05-11 02:14:09 +00:00
|
|
|
add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp")
|
|
|
|
endif ()
|
|
|
|
endif ()
|
2013-12-23 22:01:12 +00:00
|
|
|
|
2014-01-14 00:42:25 +00:00
|
|
|
add_custom_target(check
|
2014-03-04 18:43:54 +00:00
|
|
|
COMMAND ${TOOLS_DIR}/Scripts/run-gtk-tests
|
2018-04-24 01:07:57 +00:00
|
|
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
|
|
|
VERBATIM
|
2014-01-14 00:42:25 +00:00
|
|
|
)
|
2014-01-30 22:34:15 +00:00
|
|
|
|
2015-01-19 21:58:05 +00:00
|
|
|
if (DEVELOPER_MODE)
|
2017-11-03 18:42:55 +00:00
|
|
|
add_custom_target(Documentation DEPENDS gtkdoc)
|
|
|
|
WEBKIT_DECLARE_DIST_TARGETS(GTK webkitgtk ${TOOLS_DIR}/gtk/manifest.txt.in)
|
2015-01-19 21:58:05 +00:00
|
|
|
endif ()
|