https://bugs.webkit.org/show_bug.cgi?id=130188
Reviewed by Carlos Garcia Campos.
Only try to install the HTML documentation if the build is configured to generate it via
the new ENABLE_GTKDOC option. We cannot conditionally install something, so this allows us
to keep the HTML documentation directory as an installation source.
* Source/PlatformGTK.cmake: The gtkdoc target now always builds HTML documentation, but
is only added to the default target when ENABLE_GTKDOC is turned on. gtkdoc-no-html is
now only added to the default target when DEVELOPER_MODE is true and ENABLE_GTKDOC is
false. When both ENABLE_GTKDOC and DEVELOPER_MODE are false, documentation isn't built at all.
* Source/cmake/OptionsGTK.cmake: Add an ENABLE_GTKDOC option to the build.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168591
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-05-10 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK][CMake] Unable to do make install
+ https://bugs.webkit.org/show_bug.cgi?id=130188
+
+ Reviewed by Carlos Garcia Campos.
+
+ Only try to install the HTML documentation if the build is configured to generate it via
+ the new ENABLE_GTKDOC option. We cannot conditionally install something, so this allows us
+ to keep the HTML documentation directory as an installation source.
+
+ * Source/PlatformGTK.cmake: The gtkdoc target now always builds HTML documentation, but
+ is only added to the default target when ENABLE_GTKDOC is turned on. gtkdoc-no-html is
+ now only added to the default target when DEVELOPER_MODE is true and ENABLE_GTKDOC is
+ false. When both ENABLE_GTKDOC and DEVELOPER_MODE are false, documentation isn't built at all.
+ * Source/cmake/OptionsGTK.cmake: Add an ENABLE_GTKDOC option to the build.
+
2014-05-09 Anders Carlsson <andersca@apple.com>
Rename WebKit2.framework to WebKit.framework
"${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
"${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
)
+endif ()
+
+if (ENABLE_GTKDOC)
install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html/
DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk
)
)
endmacro()
-add_gtkdoc_generator("docs-build-no-html.stamp" "--skip-html")
-add_custom_target(gtkdoc-no-html ALL
- DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp"
-)
-
add_gtkdoc_generator("docs-build.stamp" "")
-add_custom_target(gtkdoc
- DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp"
-)
+if (ENABLE_GTKDOC)
+ add_custom_target(gtkdoc ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build.stamp")
+else ()
+ 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" "--skip-html")
+ add_custom_target(gtkdoc-no-html ALL DEPENDS "${CMAKE_BINARY_DIR}/docs-build-no-html.stamp")
+ endif ()
+endif ()
add_custom_target(check
COMMAND ${TOOLS_DIR}/Scripts/run-gtk-tests
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 16 2 16)
set(ENABLE_CREDENTIAL_STORAGE ON CACHE BOOL "Whether or not to enable support for credential storage using libsecret.")
+set(ENABLE_GTKDOC OFF CACHE BOOL "Whether or not to use generate gtkdoc.")
# FIXME: We want to expose fewer options to downstream, but for now everything is public.
WEBKIT_OPTION_BEGIN()