aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindSphinx.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindSphinx.cmake')
-rw-r--r--cmake/modules/FindSphinx.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/modules/FindSphinx.cmake b/cmake/modules/FindSphinx.cmake
new file mode 100644
index 000000000..8e18e2cb2
--- /dev/null
+++ b/cmake/modules/FindSphinx.cmake
@@ -0,0 +1,24 @@
+#.rst:
+# FindSphinx
+# ------------
+#
+# Find sphinx documentation generator
+#
+# The module defines the following variables:
+#
+# ::
+#
+# SPHINX_FOUND - true if sphinx was found
+# SPHINX_EXECUTABLE - sphinx binary
+
+find_program(SPHINX_EXECUTABLE
+ NAMES
+ sphinx-build
+ HINTS
+ ${SPHINX_ROOT_DIR}
+ ${CMAKE_INSTALL_PREFIX})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Sphinx DEFAULT_MSG SPHINX_EXECUTABLE)
+mark_as_advanced(SPHINX_EXECUTABLE)
+