Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cmake's Doxygen integration, only generate docs for public API #116

Merged
merged 4 commits into from
Mar 4, 2024
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
22 changes: 9 additions & 13 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ if(BUILD_DOCUMENTATION)
message(FATAL_ERROR "Doxygen is needed to build the documentation.")
endif()

set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

configure_file(${doxyfile_in} ${doxyfile} @ONLY)

add_custom_target(doc
ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html TYPE DOC)
set(DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES)
if (ENABLE_WERROR)
set(DOXYGEN_WARN_AS_ERROR YES)
endif()
doxygen_add_docs(apidocs
${CMAKE_SOURCE_DIR}/src/popt.h
ALL USE_STAMP_FILE
)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html TYPE DOC)
endif()

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../popt.3
Expand Down
Loading