Allowed to build html documentation without pdf documentation.

This commit is contained in:
Andrey Kamaev 2011-07-19 20:27:58 +00:00
parent 05ff8217e0
commit f503b029a7
2 changed files with 10 additions and 3 deletions

View File

@ -1702,8 +1702,12 @@ endif()
status("") status("")
status(" Documentation:") status(" Documentation:")
status(" Sphinx:" HAVE_SPHINX THEN "${SPHINX_BUILD} (ver ${SPHINX_VERSION})" ELSE NO) status(" Sphinx:" HAVE_SPHINX THEN "${SPHINX_BUILD} (ver ${SPHINX_VERSION})" ELSE NO)
status(" PdfLaTeX compiler:" BUILD_DOCS AND PDFLATEX_COMPILER THEN "${PDFLATEX_COMPILER}" ELSE NO) status(" PdfLaTeX compiler:" PDFLATEX_COMPILER THEN "${PDFLATEX_COMPILER}" ELSE NO)
status(" Build Documentation:" BUILD_DOCS AND PDFLATEX_COMPILER AND HAVE_SPHINX THEN YES ELSE NO) if (BUILD_DOCS AND HAVE_SPHINX)
status(" Build Documentation:" PDFLATEX_COMPILER THEN YES ELSE "YES (HTML only)")
else()
status(" Build Documentation:" NO)
endif()
# samples and tests # samples and tests
status("") status("")

View File

@ -7,7 +7,7 @@ file(GLOB FILES_DOC_VS vidsurv/*.doc)
file(GLOB FILES_TEX *.tex *.sty *.bib) file(GLOB FILES_TEX *.tex *.sty *.bib)
file(GLOB FILES_TEX_PICS pics/*.png pics/*.jpg) file(GLOB FILES_TEX_PICS pics/*.png pics/*.jpg)
if(BUILD_DOCS AND PDFLATEX_COMPILER AND HAVE_SPHINX) if(BUILD_DOCS AND HAVE_SPHINX)
project(opencv_docs) project(opencv_docs)
@ -20,6 +20,7 @@ file(GLOB_RECURSE OPENCV_FILES_TUT_PICT tutorials/*.png tutorials/*.jpg)
set(OPENCV_DOC_DEPS conf.py ${OPENCV_FILES_REF} ${OPENCV_FILES_REF_PICT} set(OPENCV_DOC_DEPS conf.py ${OPENCV_FILES_REF} ${OPENCV_FILES_REF_PICT}
${OPENCV_FILES_UG} ${OPENCV_FILES_TUT} ${OPENCV_FILES_TUT_PICT}) ${OPENCV_FILES_UG} ${OPENCV_FILES_TUT} ${OPENCV_FILES_TUT_PICT})
if (PDFLATEX_COMPILER)
add_custom_target(docs add_custom_target(docs
${SPHINX_BUILD} ${SPHINX_BUILD}
-b latex -c ${CMAKE_CURRENT_SOURCE_DIR} -b latex -c ${CMAKE_CURRENT_SOURCE_DIR}
@ -38,6 +39,8 @@ add_custom_target(docs
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating the PDF Manuals") COMMENT "Generating the PDF Manuals")
endif()
add_custom_target(html_docs add_custom_target(html_docs
${SPHINX_BUILD} ${SPHINX_BUILD}
-b html -c ${CMAKE_CURRENT_SOURCE_DIR} -b html -c ${CMAKE_CURRENT_SOURCE_DIR}