refact doxygen generator
This commit is contained in:
parent
9521eca272
commit
ef4f731454
|
@ -75,27 +75,6 @@ target_include_directories(api INTERFACE "include/client")
|
|||
add_subdirectory(source)
|
||||
|
||||
# docs
|
||||
# https://vicrucann.github.io/tutorials/quick-cmake-doxygen/
|
||||
if(${BUILD_DOCS})
|
||||
find_package(Doxygen)
|
||||
if (DOXYGEN_FOUND)
|
||||
# Build the doc
|
||||
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/docs/Doxyfile.in)
|
||||
set(DOXYGEN_OUT ${CMAKE_BINARY_DIR}/Doxyfile)
|
||||
|
||||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
|
||||
message("Doxygen build start")
|
||||
|
||||
add_custom_target(
|
||||
tdengine_doxygen ALL
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API doxumentation with Doxygen"
|
||||
VERBATIM
|
||||
)
|
||||
else(DOXYGEN_FOUND)
|
||||
message("Doxygen need to be installed to generate the doxygen documentation")
|
||||
endif(DOXYGEN_FOUND)
|
||||
endif(${BUILD_DOCS})
|
||||
add_subdirectory(docs)
|
||||
|
||||
# tests (TODO)
|
||||
|
|
|
@ -40,5 +40,5 @@ option(
|
|||
option(
|
||||
BUILD_DOCS
|
||||
"If use doxygen build documents"
|
||||
ON
|
||||
OFF
|
||||
)
|
|
@ -0,0 +1,23 @@
|
|||
# Generate API documentation
|
||||
## https://vicrucann.github.io/tutorials/quick-cmake-doxygen/
|
||||
if(${BUILD_DOCS})
|
||||
find_package(Doxygen)
|
||||
if (DOXYGEN_FOUND)
|
||||
# Build the doc
|
||||
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/docs/Doxyfile.in)
|
||||
set(DOXYGEN_OUT ${CMAKE_BINARY_DIR}/Doxyfile)
|
||||
|
||||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
|
||||
message("Doxygen build start")
|
||||
|
||||
add_custom_target(
|
||||
tdengine_doxygen ALL
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API doxumentation with Doxygen"
|
||||
VERBATIM
|
||||
)
|
||||
else(DOXYGEN_FOUND)
|
||||
message("Doxygen need to be installed to generate the doxygen documentation")
|
||||
endif(DOXYGEN_FOUND)
|
||||
endif(${BUILD_DOCS})
|
|
@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# title of most generated pages and in a few other places.
|
||||
# The default value is: My Project.
|
||||
|
||||
PROJECT_NAME = "TDengine"
|
||||
PROJECT_NAME = @CMAKE_PROJECT_NAME@
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
|
@ -829,7 +829,7 @@ WARN_LOGFILE =
|
|||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = include source
|
||||
INPUT = @CMAKE_SOURCE_DIR@/include @CMAKE_SOURCE_DIR@/source
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
|
Loading…
Reference in New Issue