commit | c51b11c1046366035e7da95e4d8a78100ef3f153 | [log] [tgz] |
---|---|---|
author | Pablo Speciale <pablo.speciale@gmail.com> | Tue Mar 12 00:56:56 2013 -0700 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Tue Mar 19 21:05:31 2013 +0000 |
tree | 982b1c400e38492e5d6f88a1e73b60684e286ffd | |
parent | 793a339335d8d52279efb49bcd704d196646efb5 [diff] [blame] |
Sphinx and CMake, based on this example: http://ericscottbarr.com/blog/2012/03/sphinx-and-cmake-beautiful-documentation-for-c-projects/ The 'docs/CMakeLists.txt' file was deleted in this commit: 0abfb8f46f534b05413bb4d64b960d6fd0a9befb Thanks to Arnaud Gelas, he has passed some links: https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/CMake/FindSphinx.cmake https://github.com/InsightSoftwareConsortium/ITKExamples/blob/master/CMakeLists.txt#L120-L154 Change-Id: Ic65e7f8ec5280d1e71a897a144417a21761c5553
diff --git a/cmake/FindSphinx.cmake b/cmake/FindSphinx.cmake new file mode 100644 index 0000000..cd55bbe --- /dev/null +++ b/cmake/FindSphinx.cmake
@@ -0,0 +1,35 @@ +# Find the Sphinx documentation generator +# +# This modules defines +# SPHINX_EXECUTABLE +# SPHINX_FOUND + +FIND_PROGRAM(SPHINX_EXECUTABLE + NAMES sphinx-build + PATHS + /usr/bin + /usr/local/bin + /opt/local/bin + DOC "Sphinx documentation generator") + +IF (NOT SPHINX_EXECUTABLE) + SET(_Python_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) + + FOREACH (_version ${_Python_VERSIONS}) + SET(_sphinx_NAMES sphinx-build-${_version}) + + FIND_PROGRAM(SPHINX_EXECUTABLE + NAMES ${_sphinx_NAMES} + PATHS + /usr/bin + /usr/local/bin + /opt/loca/bin + DOC "Sphinx documentation generator") + ENDFOREACH () +ENDIF () + +INCLUDE(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx DEFAULT_MSG SPHINX_EXECUTABLE) + +MARK_AS_ADVANCED(SPHINX_EXECUTABLE)