From: bruneton Date: Wed, 10 Jul 2013 06:56:29 +0000 (+0000) Subject: CMake: re-activating the option to overload PYTHONPATH of Sphinx. X-Git-Tag: B4KillOfAutomake~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=159c6129ca24622687d2141801853eb0aa8ffc14;p=modules%2Fkernel.git CMake: re-activating the option to overload PYTHONPATH of Sphinx. --- diff --git a/salome_adm/cmake_files/FindSalomeSphinx.cmake b/salome_adm/cmake_files/FindSalomeSphinx.cmake index 5775e69ed..c9b467066 100644 --- a/salome_adm/cmake_files/FindSalomeSphinx.cmake +++ b/salome_adm/cmake_files/FindSalomeSphinx.cmake @@ -21,8 +21,9 @@ # # !! Please read the generic detection procedure in SalomeMacros.cmake !! # -# The caller of this macro might set SPHINX_PYTHONPATH to provide a PYTHONPATH with -# which the sphinx command should be ran. +# The caller of this macro might set SPHINX_PYTHONPATH to provide a path to be added in front +# of the PYTHONPATH with which the sphinx command should be ran. +# # Note the environment is also overriden in # doc/docutils/CMakeLists.txt # with the creation of a dedicated launcher script. @@ -35,10 +36,11 @@ SET(SETUPTOOLS_ROOT_DIR "$ENV{SETUPTOOLS_ROOT_DIR}" CACHE PATH "Path to the Setu SET(DOCUTILS_ROOT_DIR "$ENV{DOCUTILS_ROOT_DIR}" CACHE PATH "Path to the Setuptools installation") # Ensure the command is run with the given PYTHONPATH -#IF(WIN32 AND NOT CYGWIN) -# MESSAGE(WARNING "Sphinx windows command needs a proper PYTHONPATH to run.") -#ELSE() -# SET(SPHINX_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$ENV{PYTHONPATH}" ${SPHINX_EXECUTABLE}) -#ENDIF() +IF(WIN32 AND NOT CYGWIN) + MESSAGE(WARNING "Sphinx windows command not re-tested.") + SET(SPHINX_EXECUTABLE set PYTHONPATH="${SPHINX_PYTHONPATH};%PYTHONPATH%" && ${SPHINX_EXECUTABLE}) +ELSE() + SET(SPHINX_EXECUTABLE /usr/bin/env PYTHONPATH="${SPHINX_PYTHONPATH}:$$PYTHONPATH" ${SPHINX_EXECUTABLE}) +ENDIF() MARK_AS_ADVANCED(SPHINX_EXECUTABLE)