add_custom_target(hugo COMMAND hugo WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/hugo)
add_dependencies(hugo excopy figures)
# Build targets excopy and figures populate hugo/static/(img|py)/auto;
# build target hugo copies them from hugo/static/(img|py) to hugo/public/(img|py).

# The following is needed to decouple top-level target webdoc from hugo;
# empirically, without this, the dependence of hugo on excopy and figures is not respected.
add_custom_target(webdoc)
add_dependencies(webdoc hugo)
