diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2020-11-20 04:29:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-20 04:29:01 (GMT) |
commit | c421ecca2c0b662bedee45484fd2bff774413dc2 (patch) | |
tree | 20dbc79def9c42755a2992a2efa32927ab1b073a /src/CMakeLists.txt | |
parent | 6ab961488afdd27c9f1ab907d557e7406a0e01f9 (diff) | |
download | hdf5-c421ecca2c0b662bedee45484fd2bff774413dc2.zip hdf5-c421ecca2c0b662bedee45484fd2bff774413dc2.tar.gz hdf5-c421ecca2c0b662bedee45484fd2bff774413dc2.tar.bz2 |
Add doxygen framework for CMake and autotools (#90)
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fd864a6..cbf3e66 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1293,3 +1293,41 @@ if (NOT WIN32) COMPONENT libraries ) endif () + +#----------------------------------------------------------------------------- +# Option to build documentation +#----------------------------------------------------------------------------- +if (DOXYGEN_FOUND) + set (DOXYGEN_PACKAGE ${HDF5_PACKAGE}) + set (DOXYGEN_VERSION_STRING ${HDF5_VERSION_STRING}) + set (DOXYGEN_INCLUDE_ALIASES ${HDF5_DOXYGEN_DIR}/aliases) + set (DOXYGEN_PROJECT_LOGO ${HDF5_DOXYGEN_DIR}/img/HDFG-logo.png) + set (DOXYGEN_PROJECT_BRIEF "C-API Reference") + set (DOXYGEN_INPUT_DIRECTORY ${HDF5_SRC_DIR} ${HDF5_DOXYGEN_DIR}/dox ${HDF5_GENERATED_SOURCE_DIR}/shared) + set (DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES) + set (DOXYGEN_MACRO_EXPANSION YES) + set (DOXYGEN_OUTPUT_DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs) + + # Replace variables inside @@ with the current values + configure_file(${HDF5_DOXYGEN_DIR}/Doxyfile.in Doxyfile @ONLY) + + doxygen_add_docs(hdf5lib_doc +# ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${HDF5_DOXYGEN_DIR}/dox + ${DOXYGEN_INPUT_DIRECTORY} + ALL + WORKING_DIRECTORY ${HDF5_SRC_DIR} + COMMENT "Generating HDF5 library Source Documentation" + ) + install( + DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs/html + DESTINATION ${HDF5_INSTALL_DATA_DIR} + COMPONENT Documents + ) + + if(NOT TARGET doxygen) + add_custom_target(doxygen) + endif() + + add_dependencies(doxygen hdf5lib_doc) + +endif () |