Skip to content

Commit

Permalink
rework doxygen command
Browse files Browse the repository at this point in the history
  • Loading branch information
goatshriek committed Jun 17, 2023
1 parent f3e3fdb commit ef70fd1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,30 @@ set(LOCALE $ENV{LANG}


# documentation and doxygen setup
set(PROJECT_DOCS_DIR ${CMAKE_BINARY_DIR}/docs)
set(PROJECT_DOCS_DIR ${PROJECT_BINARY_DIR}/docs)
include(FindDoxygen QUIET)
if(DOXYGEN_FOUND)
configure_file(${PROJECT_SOURCE_DIR}/tools/doxygen/Doxyfile.in ${CMAKE_BINARY_DIR}/tools/doxygen/Doxyfile)
configure_file(${PROJECT_SOURCE_DIR}/tools/doxygen/Doxyfile.in ${PROJECT_BINARY_DIR}/tools/doxygen/Doxyfile)

file(GLOB_RECURSE DOXYGEN_PUBLIC_HEADERS ${PROJECT_SOURCE_DIR}/include/stumpless/*.h)
set(EXAMPLE_SOURCES
${PROJECT_SOURCE_DIR}/docs/examples/basic/basic_example.c
)

add_custom_target(docs
add_custom_command(
OUTPUT
${PROJECT_BINARY_DIR}/docs/man/man3/config.h.3
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/tools/doxygen/Doxyfile
MAIN_DEPENDENCY ${CMAKE_BINARY_DIR}/tools/doxygen/Doxyfile
DEPENDS
${CMAKE_BINARY_DIR}/tools/doxygen/Doxyfile
${DOXYGEN_PUBLIC_HEADERS}
${EXAMPLE_SOURCES}
${PROJECT_SOURCE_DIR}/include/stumpless.h
${CMAKE_BINARY_DIR}/include/stumpless/config.h
BYPRODUCTS
${PROJECT_BINARY_DIR}/docs/man/man3/config.h.3
${PROJECT_BINARY_DIR}/include/stumpless/config.h
)

add_custom_target(docs DEPENDS ${PROJECT_BINARY_DIR}/docs/man/man3/config.h.3)

set(INCLUDE_MANPAGES_IN_INSTALL INSTALL_MANPAGES)
else()
if(INSTALL_MANPAGES)
Expand Down

0 comments on commit ef70fd1

Please sign in to comment.