6d8727
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
6d8727
index 2af32d53..0ad2d602 100644
6d8727
--- a/doc/CMakeLists.txt
6d8727
+++ b/doc/CMakeLists.txt
6d8727
@@ -4,11 +4,13 @@ if (NOT DOXYGEN)
6d8727
   return ()
6d8727
 endif ()
6d8727
 
6d8727
+find_package(PythonInterp
6d8727
+  QUIET REQUIRED)
6d8727
 find_program(SPHINX_EXECUTABLE
6d8727
   NAMES sphinx-build sphinx-build-3)
6d8727
 add_custom_target(doc
6d8727
   COMMAND ${CMAKE_COMMAND} -E env SPHINX_EXECUTABLE=${SPHINX_EXECUTABLE}
6d8727
-    ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION}
6d8727
+    ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION}
6d8727
   SOURCES api.rst syntax.rst usage.rst build.py conf.py _templates/layout.html)
6d8727
 
6d8727
 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
6d8727
-- 
6d8727
2.26.2
6d8727