Improved configurability of doxygen output - can choose output via cmake varialbles
parent
88b51d45b8
commit
08ea3efb06
|
@ -36,12 +36,13 @@ else()
|
||||||
set(GTSAM_UNSTABLE_AVAILABLE 0)
|
set(GTSAM_UNSTABLE_AVAILABLE 0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Check for doxygen availability
|
||||||
|
find_package(Doxygen)
|
||||||
|
|
||||||
# Configurable Options
|
# Configurable Options
|
||||||
option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
|
option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
|
||||||
option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" ON)
|
option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" ON)
|
||||||
option(GTSAM_BUILD_EXAMPLES "Enable/Disable building of examples" ON)
|
option(GTSAM_BUILD_EXAMPLES "Enable/Disable building of examples" ON)
|
||||||
option(GTSAM_BUILD_DOCS "Enable/Disable building of doxygen docs" OFF)
|
|
||||||
if(GTSAM_UNSTABLE_AVAILABLE)
|
if(GTSAM_UNSTABLE_AVAILABLE)
|
||||||
option(GTSAM_BUILD_UNSTABLE "Enable/Disable libgtsam_unstable" ON)
|
option(GTSAM_BUILD_UNSTABLE "Enable/Disable libgtsam_unstable" ON)
|
||||||
endif()
|
endif()
|
||||||
|
@ -155,18 +156,40 @@ endif(GTSAM_BUILD_UNSTABLE)
|
||||||
GtsamMakeConfigFile(GTSAM)
|
GtsamMakeConfigFile(GTSAM)
|
||||||
export(TARGETS ${GTSAM_EXPORTED_TARGETS} FILE GTSAM-exports.cmake)
|
export(TARGETS ${GTSAM_EXPORTED_TARGETS} FILE GTSAM-exports.cmake)
|
||||||
|
|
||||||
|
# Doxygen documentation configuration
|
||||||
|
if (DOXYGEN_FOUND)
|
||||||
|
option(GTSAM_BUILD_DOCS "Enable/Disable building of doxygen docs" OFF)
|
||||||
|
|
||||||
|
# configure doxygen
|
||||||
|
option(GTSAM_BUILD_DOC_HTML "Enable/Disable doxygen HTML output" ON)
|
||||||
|
option(GTSAM_BUILD_DOC_LATEX "Enable/Disable doxygen LaTeX output" OFF)
|
||||||
|
|
||||||
# add a target to generate API documentation with Doxygen
|
# add a target to generate API documentation with Doxygen
|
||||||
if (GTSAM_BUILD_DOCS)
|
if (GTSAM_BUILD_DOCS)
|
||||||
find_package(Doxygen)
|
# Convert configuration to YES/NO variables
|
||||||
if(DOXYGEN_FOUND)
|
if (GTSAM_BUILD_DOC_HTML)
|
||||||
|
set(GTSAM_BUILD_DOC_HTML_YN "YES")
|
||||||
|
else()
|
||||||
|
set(GTSAM_BUILD_DOC_HTML_YN "NO")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (GTSAM_BUILD_DOC_LATEX)
|
||||||
|
set(GTSAM_BUILD_DOC_LATEX_YN "YES")
|
||||||
|
else()
|
||||||
|
set(GTSAM_BUILD_DOC_LATEX_YN "NO")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Generate Doxyfile
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||||
|
|
||||||
|
# Add target to actually build documentation as configured
|
||||||
add_custom_target(doc
|
add_custom_target(doc
|
||||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc
|
||||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||||
)
|
)
|
||||||
endif(DOXYGEN_FOUND)
|
endif()
|
||||||
endif (GTSAM_BUILD_DOCS)
|
endif ()
|
||||||
|
|
||||||
# Set up CPack
|
# Set up CPack
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTSAM")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTSAM")
|
||||||
|
@ -191,7 +214,9 @@ message(STATUS "Build flags ")
|
||||||
print_config_flag(${GTSAM_BUILD_TIMING} "Build Timing scripts ")
|
print_config_flag(${GTSAM_BUILD_TIMING} "Build Timing scripts ")
|
||||||
print_config_flag(${GTSAM_BUILD_EXAMPLES} "Build Examples ")
|
print_config_flag(${GTSAM_BUILD_EXAMPLES} "Build Examples ")
|
||||||
print_config_flag(${GTSAM_BUILD_TESTS} "Build Tests ")
|
print_config_flag(${GTSAM_BUILD_TESTS} "Build Tests ")
|
||||||
|
if (DOXYGEN_FOUND)
|
||||||
print_config_flag(${GTSAM_BUILD_DOCS} "Build Docs ")
|
print_config_flag(${GTSAM_BUILD_DOCS} "Build Docs ")
|
||||||
|
endif()
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
print_config_flag(${GTSAM_BUILD_SHARED_LIBRARY} "Build shared GTSAM Library ")
|
print_config_flag(${GTSAM_BUILD_SHARED_LIBRARY} "Build shared GTSAM Library ")
|
||||||
print_config_flag(${GTSAM_BUILD_STATIC_LIBRARY} "Build static GTSAM Library ")
|
print_config_flag(${GTSAM_BUILD_STATIC_LIBRARY} "Build static GTSAM Library ")
|
||||||
|
|
|
@ -880,7 +880,7 @@ IGNORE_PREFIX =
|
||||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||||
# generate HTML output.
|
# generate HTML output.
|
||||||
|
|
||||||
GENERATE_HTML = YES
|
GENERATE_HTML = @GTSAM_BUILD_DOC_HTML_YN@
|
||||||
|
|
||||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||||
|
@ -1234,7 +1234,7 @@ SERVER_BASED_SEARCH = NO
|
||||||
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
|
||||||
# generate Latex output.
|
# generate Latex output.
|
||||||
|
|
||||||
GENERATE_LATEX = NO
|
GENERATE_LATEX = @GTSAM_BUILD_DOC_LATEX_YN@
|
||||||
|
|
||||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
|
||||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||||
|
|
Loading…
Reference in New Issue