diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/FindSphinx.cmake | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/FindSphinx.cmake b/modules/FindSphinx.cmake new file mode 100644 index 0000000..cb68e51 --- /dev/null +++ b/modules/FindSphinx.cmake @@ -0,0 +1,21 @@ +find_program(SPHINX_EXECUTABLE NAMES sphinx-build + HINTS + $ENV{SPHINX_DIR} + PATH_SUFFIXES bin + DOC "Sphinx documentation generator" + ) + +include(FindPackageHandleStandardArgs) + +if(NOT SPHINX_EXECUTABLE) + message(STATUS "Sphinx generator not found! Skipping setup for documentation generator.") + set(SPHINX_FOUND false) +else() + find_package_handle_standard_args(Sphinx DEFAULT_MSG + SPHINX_EXECUTABLE + ) + + mark_as_advanced(SPHINX_EXECUTABLE) + set(SPHINX_FOUND true) +endif() + |