Set correct dependency for doc build on gmxapi
authorPaul Bauer <paul.bauer.q@gmail.com>
Fri, 13 Dec 2019 15:50:21 +0000 (16:50 +0100)
committerArtem Zhmurov <zhmurov@gmail.com>
Tue, 17 Dec 2019 20:40:56 +0000 (21:40 +0100)
When building the documentation with the python package, we need to know
about the symbols in the package when building docs for e.g. the pdf
manual.

Change-Id: Ia9a248da5746a5d90736cd3f3aa345fe8ffd0c79
(cherry picked from commit 0aa283c6b578b1b6bf6673169697865142014368)

docs/CMakeLists.txt

index 4371469b305c1da57432c6019ac9338523916248..b13a72c54dffd727f7ca89f71dd39ece142ff06d 100644 (file)
@@ -547,6 +547,9 @@ if (SPHINX_FOUND)
     gmx_add_sphinx_image_conversion_target(sphinx-image-conversion)
     add_custom_target(sphinx-input)
     add_dependencies(sphinx-input sphinx-input-rst sphinx-image-conversion)
+    if (GMX_PYTHON_PACKAGE)
+        add_dependencies(sphinx-input _gmxapi)
+    endif()
     # Remove other rst files from the build tree, since they confuse Sphinx.
     # Skip generated files in onlinehelp/, and fragments.
     # The latter do not cause issues with obsolete files, as they
@@ -613,9 +616,6 @@ if (SPHINX_FOUND)
         COMMENT "Building HTML documentation with Sphinx"
         VERBATIM
         )
-    if (GMX_PYTHON_PACKAGE)
-        add_dependencies(webpage-sphinx _gmxapi)
-    endif ()
 
     add_custom_target(man
         COMMAND