# Ensure the command is run with the given PYTHONPATH
IF(WIN32 AND NOT CYGWIN)
SET(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE})
+ SET(SPHINX_APIDOC_EXECUTABLE ${SPHINX_APIDOC_EXECUTABLE})
ELSE()
SET(SPHINX_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$$PYTHONPATH" ${SPHINX_EXECUTABLE})
+ SET(SPHINX_APIDOC_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$$PYTHONPATH" ${SPHINX_APIDOC_EXECUTABLE})
ENDIF()
MARK_AS_ADVANCED(SPHINX_EXECUTABLE)
IF(SPHINX_FOUND)
SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SPHINX_EXECUTABLE})
+ SALOME_ACCUMULATE_ENVIRONMENT(PATH ${SPHINX_APIDOC_EXECUTABLE})
SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH ${SPHINX_PYTHONPATH})
ENDIF()
#
FIND_PROGRAM(SPHINX_EXECUTABLE sphinx-build PATH_SUFFIXES Scripts)
+FIND_PROGRAM(SPHINX_APIDOC_EXECUTABLE sphinx-apidoc PATH_SUFFIXES Scripts)
# Get root dir locally, going up two levels from the exec:
GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${SPHINX_EXECUTABLE}" PATH)
ENDIF()
# Handle the standard arguments of the find_package() command:
INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE SPHINX_APIDOC_EXECUTABLE)