Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 36 additions & 30 deletions Utilities/Doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,16 @@ endif()
#
set( ITK_DOXYGEN_OUTPUT_DIR ${ITK_BINARY_DIR}/Utilities/Doxygen )

set( ITK_DOXYGEN_INPUT ${DOXYGEN_INCLUDE_DIRS} )

set( ITK_DOXYGEN_DIAGRAMS YES )

option( ITK_DOXYGEN_HTML "Doxygen will generate HTML Output" ON )
option( ITK_DOXYGEN_DOCSET "Doxygen will generate additional index files for Xcode 3" OFF )
option( ITK_DOXYGEN_CHM "Doxygen will generate Microsoft HTML help" OFF )
option( ITK_DOXYGEN_QHP "Doxygen will generate Qt Compressed Help" OFF )
option( ITK_DOXYGEN_ECLIPSEHELP "Doxygen will generate Eclipse help plugin" OFF )
option( ITK_DOXYGEN_LATEX "Doxygen will generate LaTeX output" OFF )
option( ITK_DOXYGEN_RTF "Doxygen will generate RTF output optimized for Word 97" OFF )
option( ITK_DOXYGEN_XML "Doxygen will generate XML output" OFF )
cmake_dependent_option( ITK_DOXYGEN_HTML "Doxygen will generate HTML Output" ON "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_DOCSET "Doxygen will generate additional index files for Xcode 3" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_CHM "Doxygen will generate Microsoft HTML help" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_QHP "Doxygen will generate Qt Compressed Help" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_ECLIPSEHELP "Doxygen will generate Eclipse help plugin" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_LATEX "Doxygen will generate LaTeX output" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_RTF "Doxygen will generate RTF output optimized for Word 97" OFF "ITK_BUILD_DOCUMENTATION" OFF)
cmake_dependent_option( ITK_DOXYGEN_XML "Doxygen will generate XML output" OFF "ITK_BUILD_DOCUMENTATION" OFF)

mark_as_advanced( ITK_DOXYGEN_HTML
ITK_DOXYGEN_DOCSET
Expand Down Expand Up @@ -108,23 +106,10 @@ else()
set( ITK_DOXYGEN_INPUT_FILTER )
endif()

configure_file(${ITK_SOURCE_DIR}/Utilities/Doxygen/doxygen.config.in
${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config)


set( ITK_DOXYGEN_OUTPUT_DIR ${ITK_BINARY_DIR}/temp )

set( ITK_DOXYGEN_INPUT "\"INPUT_SINGLE_FILE\"" )

set( ITK_DOXYGEN_DIAGRAMS NO )


configure_file(${ITK_SOURCE_DIR}/Utilities/Doxygen/doxygen.config.in
${ITK_BINARY_DIR}/single-doxygen.config)

# -------------------------------------------------------------
if (ITK_BUILD_DOCUMENTATION)


# When updating Doxygen versions, also re-run workbox-sw to regenerate the
# service worker pre-cache. Do this by running:
#
Expand Down Expand Up @@ -162,13 +147,34 @@ if (ITK_BUILD_DOCUMENTATION)
DEPENDS "${ITK_SOURCE_DIR}/Examples" "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake"
)

add_custom_target(Documentation ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config
MAIN_DEPENDENCY ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config
DEPENDS ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl
DEPENDS ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox
WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen
set( ITK_DOXYGEN_INPUT ${DOXYGEN_INCLUDE_DIRS}
${ITK_SOURCE_DIR}/Documentation/Doxygen
${ITK_BINARY_DIR}/Documentation/Doxygen
${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox
${ITK_BINARY_DIR}/Utilities/Doxygen/Modules
${ITK_DOXYGEN_INPUT}
)
list(REMOVE_DUPLICATES ITK_DOXYGEN_INPUT)

# The DoxygenConfig.cmake is a replacement for configuring a doxygen.config.in file
# https://cmake.org/cmake/help/v3.16/module/FindDoxygen.html
include(${CMAKE_CURRENT_LIST_DIR}/DoxygenConfig.cmake)
doxygen_add_docs(Documentation
${ITK_DOXYGEN_INPUT}
# -- Only build if 'Documentation' target is requested ALL
WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen
# -- Some of the ITK_DOXYGEN_INPUT are directories, USE_STAMP_FILE requires only files be listed
COMMENT "-- Wrapping ITK: Constructing documentation xml structure."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hjmjohnson Thank you for updating to the modern CMake Doxygen support.

I saw this CMake status/comment and had to check to see if I had wrapping enabled for my build, as I found it confusing.

Also I'm in the process of building the Doxygen with XML, because it appears the location changed.

)
unset(ITK_DOXYGEN_INPUT)

# add_custom_target(Documentation ALL
# COMMAND ${DOXYGEN_EXECUTABLE} ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config
# MAIN_DEPENDENCY ${ITK_BINARY_DIR}/Utilities/Doxygen/doxygen.config
# DEPENDS ${ITK_BINARY_DIR}/Utilities/Doxygen/itkdoxygen.pl
# DEPENDS ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox
# WORKING_DIRECTORY ${ITK_BINARY_DIR}/Utilities/Doxygen
# )

# Somehow the logo image is not copied into the html folder.
# Here we ensure that the logo image ends up in the right directory
Expand Down
Loading