ENDIF()
IF(SALOME_BUILD_DOC)
FIND_PACKAGE(SalomeDoxygen)
+ SET(Sphinx_EXTENSIONS sphinxcontrib.napoleon)
FIND_PACKAGE(SalomeSphinx)
SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC)
SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc',
- 'sphinxcontrib.napoleon'
-]
+extensions = ['sphinx.ext.autodoc']
+try:
+ import sphinxcontrib.napoleon
+ extensions += ['sphinxcontrib.napoleon']
+except:
+ pass
+
#add pdfbuilder to build a pdf with rst2pdf
#extensions = ['rst2pdf.pdfbuilder']