@ -20,6 +20,12 @@ if(DOXYGEN_FOUND)
set ( OPENCV_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0" CACHE STRING "URI to a MathJax installation" )
set ( OPENCV_DOCS_EXCLUDE_CUDA ON )
if ( ";${OPENCV_MODULES_EXTRA};" MATCHES ";cudev;" )
set ( OPENCV_DOCS_EXCLUDE_CUDA OFF )
list ( APPEND CMAKE_DOXYGEN_ENABLED_SECTIONS "CUDA_MODULES" )
endif ( )
# g a t h e r i n g h e a d e r s
set ( paths_include )
set ( paths_doc )
@ -38,6 +44,15 @@ if(DOXYGEN_FOUND)
if ( EXISTS "${header_dir}" )
list ( APPEND paths_include "${header_dir}" )
list ( APPEND deps ${ header_dir } )
if ( OPENCV_DOCS_EXCLUDE_CUDA )
if ( EXISTS "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda" )
list ( APPEND CMAKE_DOXYGEN_EXCLUDE_LIST "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda" )
endif ( )
file ( GLOB list_cuda_files "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/*cuda*.hpp" )
if ( list_cuda_files )
list ( APPEND CMAKE_DOXYGEN_EXCLUDE_LIST ${ list_cuda_files } )
endif ( )
endif ( )
endif ( )
# d o c f o l d e r
set ( docs_dir "${OPENCV_MODULE_opencv_${m}_LOCATION}/doc" )
@ -124,6 +139,8 @@ if(DOXYGEN_FOUND)
# s e t e x p o r t v a r i a b l e s
string ( REPLACE ";" " \\\n" CMAKE_DOXYGEN_INPUT_LIST "${rootfile} ; ${faqfile} ; ${paths_include} ; ${paths_hal_interface} ; ${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${tutorial_js_path} ; ${paths_tutorial} ; ${tutorial_contrib_root}" )
string ( REPLACE ";" " \\\n" CMAKE_DOXYGEN_IMAGE_PATH "${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${tutorial_js_path} ; ${paths_tutorial}" )
string ( REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXCLUDE_LIST "${CMAKE_DOXYGEN_EXCLUDE_LIST}" )
string ( REPLACE ";" " " CMAKE_DOXYGEN_ENABLED_SECTIONS "${CMAKE_DOXYGEN_ENABLED_SECTIONS}" )
# T O D O : r e m o v e p a t h s _ d o c f r o m E X A M P L E _ P A T H a f t e r f a c e m o d u l e t u t o r i a l s / s a m p l e s m o v e d t o s e p a r a t e f o l d e r s
string ( REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXAMPLE_PATH "${example_path} ; ${paths_doc} ; ${paths_sample}" )
set ( CMAKE_DOXYGEN_LAYOUT "${CMAKE_CURRENT_BINARY_DIR}/DoxygenLayout.xml" )