Skip to content
Snippets Groups Projects
Unverified Commit 236185af authored by Brent Huisman's avatar Brent Huisman Committed by GitHub
Browse files

Use FindPythonModule to warn for missing svgwrite (#1243)

Update CMake configure to look for svgwrite when building docs.

Fixes #1128.
parent d5c4f244
No related branches found
No related tags found
No related merge requests found
include(FindPythonModule) # required for find_python_module
find_package(Sphinx)
add_target_if(SPHINX_FOUND
check-sphinx
"Finding Sphinx"
"Sphinx must be installed to build documentation")
find_python_module(svgwrite)
add_target_if(HAVE_SVGWRITE
ext-svgwrite
"Finding svgwrite"
"The Python module svgwrite needs to be installed to build documentation. Use pip to install svgwrite")
set(html_dir "${CMAKE_CURRENT_BINARY_DIR}/html")
set(doctree_dir "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
......@@ -19,7 +27,7 @@ add_custom_target(html
-q # Quiet: no output other than errors and warnings.
${CMAKE_CURRENT_SOURCE_DIR} # Source directory
${html_dir} # Output directory
DEPENDS check-sphinx ext-sphinx_rtd_theme
DEPENDS check-sphinx ext-sphinx_rtd_theme ext-svgwrite
COMMENT
"Generating Sphinx documentation")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment