haikuwebkit/Source/PlatformWPE.cmake

40 lines
1.8 KiB
CMake
Raw Permalink Normal View History

[WPE] Add gtk-doc https://bugs.webkit.org/show_bug.cgi?id=178900 Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-04 Reviewed by Michael Catanzaro. Add gtk-doc to WPE port. This patch tries to reuse as much code from WebKitGTK+ as possible. .: * Source/PlatformGTK.cmake: include GtkDoc.cmake instead of defining macro. * Source/PlatformWPE.cmake: Added documentation generation. * Source/cmake/GtkDoc.cmake: Added. * Source/cmake/OptionsWPE.cmake: Added ENABLE_GTKDOC build option and added pkg-config path variables. Source/WebKit: * PlatformWPE.cmake: Write variables to gtkdoc-wpe.cfg and gtkdoc-webextensions that is used by python script later. * UIProcess/API/wpe/WebKitWebContext.h: Placed sandbox functions in the same location as in the WebKitGTK+ for consistency. * UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Added. * UIProcess/API/wpe/docs/wpe-docs.sgml: Added. * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Placed webkit_web_page_get_dom_document in the same position as in the WebKitGTK+ for consistency. * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-0.1-sections.txt: Added. * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml: Added. Tools: * gtkdoc/generate-gtkdoc: Renamed from Tools/gtk/generate-gtkdoc. (get_gtkdoc_module_paths): Add GDK and GTK only if building for GTK. (prepare_environment_for_gtkdoc_generation): (build_gtkdoc_for_wpe): Code to generate doc for WPE. (build_gtkdoc_for_wkgtk): Code to generate doc for WebKitGTK+. Moved from main. * gtkdoc/gtkdoc.py: Renamed from Tools/gtk/gtkdoc.py. (GTKDoc.__init__): Initialized required variables according to pylint. (GTKDoc.api_missing_documentation): * wpe/install-dependencies: Add gtkdoc dependency. Canonical link: https://commits.webkit.org/206993@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-04 16:33:22 +00:00
include(GtkDoc)
include(WebKitDist)
[WPE] Add gtk-doc https://bugs.webkit.org/show_bug.cgi?id=178900 Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-04 Reviewed by Michael Catanzaro. Add gtk-doc to WPE port. This patch tries to reuse as much code from WebKitGTK+ as possible. .: * Source/PlatformGTK.cmake: include GtkDoc.cmake instead of defining macro. * Source/PlatformWPE.cmake: Added documentation generation. * Source/cmake/GtkDoc.cmake: Added. * Source/cmake/OptionsWPE.cmake: Added ENABLE_GTKDOC build option and added pkg-config path variables. Source/WebKit: * PlatformWPE.cmake: Write variables to gtkdoc-wpe.cfg and gtkdoc-webextensions that is used by python script later. * UIProcess/API/wpe/WebKitWebContext.h: Placed sandbox functions in the same location as in the WebKitGTK+ for consistency. * UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Added. * UIProcess/API/wpe/docs/wpe-docs.sgml: Added. * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Placed webkit_web_page_get_dom_document in the same position as in the WebKitGTK+ for consistency. * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-0.1-sections.txt: Added. * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml: Added. Tools: * gtkdoc/generate-gtkdoc: Renamed from Tools/gtk/generate-gtkdoc. (get_gtkdoc_module_paths): Add GDK and GTK only if building for GTK. (prepare_environment_for_gtkdoc_generation): (build_gtkdoc_for_wpe): Code to generate doc for WPE. (build_gtkdoc_for_wkgtk): Code to generate doc for WebKitGTK+. Moved from main. * gtkdoc/gtkdoc.py: Renamed from Tools/gtk/gtkdoc.py. (GTKDoc.__init__): Initialized required variables according to pylint. (GTKDoc.api_missing_documentation): * wpe/install-dependencies: Add gtkdoc dependency. Canonical link: https://commits.webkit.org/206993@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-04 16:33:22 +00:00
list(APPEND DocumentationDependencies
WebKit
"${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/wpe/docs/wpe-docs.sgml"
"${CMAKE_SOURCE_DIR}/Source/WebKit/WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml"
"${CMAKE_SOURCE_DIR}/Source/WebKit/UIProcess/API/wpe/docs/wpe-${WPE_API_DOC_VERSION}-sections.txt"
"${CMAKE_SOURCE_DIR}/Source/WebKit/WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-${WPE_API_DOC_VERSION}-sections.txt"
[WPE] Add gtk-doc https://bugs.webkit.org/show_bug.cgi?id=178900 Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-04 Reviewed by Michael Catanzaro. Add gtk-doc to WPE port. This patch tries to reuse as much code from WebKitGTK+ as possible. .: * Source/PlatformGTK.cmake: include GtkDoc.cmake instead of defining macro. * Source/PlatformWPE.cmake: Added documentation generation. * Source/cmake/GtkDoc.cmake: Added. * Source/cmake/OptionsWPE.cmake: Added ENABLE_GTKDOC build option and added pkg-config path variables. Source/WebKit: * PlatformWPE.cmake: Write variables to gtkdoc-wpe.cfg and gtkdoc-webextensions that is used by python script later. * UIProcess/API/wpe/WebKitWebContext.h: Placed sandbox functions in the same location as in the WebKitGTK+ for consistency. * UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Added. * UIProcess/API/wpe/docs/wpe-docs.sgml: Added. * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Placed webkit_web_page_get_dom_document in the same position as in the WebKitGTK+ for consistency. * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-0.1-sections.txt: Added. * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml: Added. Tools: * gtkdoc/generate-gtkdoc: Renamed from Tools/gtk/generate-gtkdoc. (get_gtkdoc_module_paths): Add GDK and GTK only if building for GTK. (prepare_environment_for_gtkdoc_generation): (build_gtkdoc_for_wpe): Code to generate doc for WPE. (build_gtkdoc_for_wkgtk): Code to generate doc for WebKitGTK+. Moved from main. * gtkdoc/gtkdoc.py: Renamed from Tools/gtk/gtkdoc.py. (GTKDoc.__init__): Initialized required variables according to pylint. (GTKDoc.api_missing_documentation): * wpe/install-dependencies: Add gtkdoc dependency. Canonical link: https://commits.webkit.org/206993@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-04 16:33:22 +00:00
)
if (ENABLE_GTKDOC)
install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/wpe-${WPE_API_VERSION}/html/wpe-${WPE_API_VERSION}
DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html"
)
install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/wpe-webextensions-${WPE_API_VERSION}/html/wpe-webextensions-${WPE_API_VERSION}
DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/html"
)
endif ()
ADD_GTKDOC_GENERATOR("docs-build.stamp" "--wpe")
if (ENABLE_GTKDOC)
add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
elseif (NOT ENABLED_COMPILER_SANITIZERS AND NOT CMAKE_CROSSCOMPILING AND NOT APPLE)
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.
if (DEVELOPER_MODE)
ADD_GTKDOC_GENERATOR("docs-build-no-html.stamp" "--wpe;--skip-html")
add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp")
endif ()
endif ()
if (DEVELOPER_MODE)
[WPE] Add gtk-doc https://bugs.webkit.org/show_bug.cgi?id=178900 Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-04 Reviewed by Michael Catanzaro. Add gtk-doc to WPE port. This patch tries to reuse as much code from WebKitGTK+ as possible. .: * Source/PlatformGTK.cmake: include GtkDoc.cmake instead of defining macro. * Source/PlatformWPE.cmake: Added documentation generation. * Source/cmake/GtkDoc.cmake: Added. * Source/cmake/OptionsWPE.cmake: Added ENABLE_GTKDOC build option and added pkg-config path variables. Source/WebKit: * PlatformWPE.cmake: Write variables to gtkdoc-wpe.cfg and gtkdoc-webextensions that is used by python script later. * UIProcess/API/wpe/WebKitWebContext.h: Placed sandbox functions in the same location as in the WebKitGTK+ for consistency. * UIProcess/API/wpe/docs/wpe-0.1-sections.txt: Added. * UIProcess/API/wpe/docs/wpe-docs.sgml: Added. * WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h: Placed webkit_web_page_get_dom_document in the same position as in the WebKitGTK+ for consistency. * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-0.1-sections.txt: Added. * WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-docs.sgml: Added. Tools: * gtkdoc/generate-gtkdoc: Renamed from Tools/gtk/generate-gtkdoc. (get_gtkdoc_module_paths): Add GDK and GTK only if building for GTK. (prepare_environment_for_gtkdoc_generation): (build_gtkdoc_for_wpe): Code to generate doc for WPE. (build_gtkdoc_for_wkgtk): Code to generate doc for WebKitGTK+. Moved from main. * gtkdoc/gtkdoc.py: Renamed from Tools/gtk/gtkdoc.py. (GTKDoc.__init__): Initialized required variables according to pylint. (GTKDoc.api_missing_documentation): * wpe/install-dependencies: Add gtkdoc dependency. Canonical link: https://commits.webkit.org/206993@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-12-04 16:33:22 +00:00
add_custom_target(Documentation DEPENDS gtkdoc)
WEBKIT_DECLARE_DIST_TARGETS(WPE wpewebkit ${TOOLS_DIR}/wpe/manifest.txt.in)
endif ()