1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
# - This module looks for Sphinx
# Find the Sphinx documentation generator
#
# This modules defines
# SPHINX_EXECUTABLE
# SPHINX_FOUND
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
# Copyright 2009-2011 Peter Colberg
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file COPYING-CMAKE-SCRIPTS for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
FIND_PACKAGE(PythonInterp)
IF(PYTHONINTERP_FOUND)
IF(WIN32)
STRING(REPLACE "python.exe" "Scripts/" SPHINX_PATH "${PYTHON_EXECUTABLE}")
ELSE(WIN32)
SET(SPHINX_PATH "")
ENDIF(WIN32)
FIND_PROGRAM(SPHINX_EXECUTABLE NAMES sphinx-build
HINTS $ENV{SPHINX_DIR}
PATHS ${SPHINX_PATH}
PATH_SUFFIXES bin
DOC "Sphinx documentation generator"
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx DEFAULT_MSG
SPHINX_EXECUTABLE
)
MARK_AS_ADVANCED(
SPHINX_EXECUTABLE
)
ENDIF(PYTHONINTERP_FOUND)
|