find sphinx-build before calling build.py
this allows us to use sphinx-build-3, as user might already in a python3 world, and distros, like fedora 28, tend to add a "-3" suffix to sphinx-build. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
committed by
Victor Zverovich
parent
08a65c2282
commit
07200f445a
+4
-1
@@ -4,8 +4,11 @@ if (NOT DOXYGEN)
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
find_program(SPHINX_EXECUTABLE
|
||||
NAMES sphinx-build sphinx-build-3)
|
||||
add_custom_target(doc
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION}
|
||||
COMMAND ${CMAKE_COMMAND} -E env SPHINX_EXECUTABLE=${SPHINX_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION})
|
||||
SOURCES api.rst syntax.rst build.py conf.py _templates/layout.html)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
|
||||
|
||||
Reference in New Issue
Block a user