Improve documentation workflow (#163)

* Compact project relative paths from doc directory

* Remove committed example_list.md

- generate example_list from cmake for documentation

* Fix doxygen same-line comments

* Add workflow for generating documentation
This commit is contained in:
Tushar Maheshwari
2021-07-23 12:10:47 +05:30
committed by GitHub
parent 7f95d59954
commit a40a54ec10
7 changed files with 72 additions and 87 deletions

View File

@@ -1,10 +1,15 @@
find_package(Doxygen)
if (DOXYGEN_FOUND)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
@ONLY
)
# Generate example list for documentation
set(EXAMPLE_LIST "${CMAKE_CURRENT_BINARY_DIR}/example_list.md")
file(WRITE ${EXAMPLE_LIST} "# Examples")
file(GLOB_RECURSE EXAMPLES RELATIVE ${PROJECT_SOURCE_DIR}
"${PROJECT_SOURCE_DIR}/examples/*.cpp")
foreach(EXAMPLE IN LISTS EXAMPLES)
file(APPEND ${EXAMPLE_LIST} "\n@example ${EXAMPLE}")
endforeach(EXAMPLE IN LISTS EXAMPLES)
configure_file(Doxyfile.in Doxyfile @ONLY)
# note the option ALL which allows to build the docs together with the application
add_custom_target(doc

View File

@@ -38,7 +38,7 @@ PROJECT_NAME = "FTXUI"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = @CMAKE_PROJECT_VERSION@
PROJECT_NUMBER = @PROJECT_VERSION@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -162,7 +162,8 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
STRIP_FROM_PATH = ../..
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ \
@PROJECT_BINARY_DIR@
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
@@ -783,9 +784,10 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT += @CMAKE_CURRENT_SOURCE_DIR@/../include/
INPUT += @CMAKE_CURRENT_SOURCE_DIR@/../src/
INPUT += @PROJECT_SOURCE_DIR@/include
INPUT += @PROJECT_SOURCE_DIR@/src
INPUT += @CMAKE_CURRENT_SOURCE_DIR@
INPUT += @EXAMPLE_LIST@
# 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
@@ -902,9 +904,9 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
EXAMPLE_PATH += @CMAKE_CURRENT_SOURCE_DIR@/../examples/
EXAMPLE_PATH += @CMAKE_CURRENT_SOURCE_DIR@/../include/
EXAMPLE_PATH += @CMAKE_CURRENT_SOURCE_DIR@/../src/
EXAMPLE_PATH += @PROJECT_SOURCE_DIR@/examples
EXAMPLE_PATH += @PROJECT_SOURCE_DIR@/include
EXAMPLE_PATH += @PROJECT_SOURCE_DIR@/src
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -1085,9 +1087,9 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
CLANG_OPTIONS += --include-directory @CMAKE_CURRENT_SOURCE_DIR@/../include/
CLANG_OPTIONS += --include-directory @CMAKE_CURRENT_SOURCE_DIR@/../src/
CLANG_OPTIONS += --include-directory @CMAKE_CURRENT_SOURCE_DIR@/../examples/
CLANG_OPTIONS += --include-directory @PROJECT_SOURCE_DIR@/include
CLANG_OPTIONS += --include-directory @PROJECT_SOURCE_DIR@/src
CLANG_OPTIONS += --include-directory @PROJECT_SOURCE_DIR@/examples
CLANG_OPTIONS += -std=c++17
#---------------------------------------------------------------------------

View File

@@ -1,46 +0,0 @@
# Examples
@example ./examples/component/button.cpp
@example ./examples/component/checkbox.cpp
@example ./examples/component/checkbox_in_frame.cpp
@example ./examples/component/composition.cpp
@example ./examples/component/gallery.cpp
@example ./examples/component/homescreen.cpp
@example ./examples/component/input.cpp
@example ./examples/component/menu2.cpp
@example ./examples/component/menu.cpp
@example ./examples/component/menu_multiple.cpp
@example ./examples/component/menu_style.cpp
@example ./examples/component/modal_dialog.cpp
@example ./examples/component/radiobox.cpp
@example ./examples/component/radiobox_in_frame.cpp
@example ./examples/component/resizable_split.cpp
@example ./examples/component/slider.cpp
@example ./examples/component/slider_rgb.cpp
@example ./examples/component/tab_horizontal.cpp
@example ./examples/component/tab_vertical.cpp
@example ./examples/component/toggle.cpp
@example ./examples/dom/border.cpp
@example ./examples/dom/color_gallery.cpp
@example ./examples/dom/color_info_palette256.cpp
@example ./examples/dom/color_truecolor_HSV.cpp
@example ./examples/dom/color_truecolor_RGB.cpp
@example ./examples/dom/dbox.cpp
@example ./examples/dom/gauge.cpp
@example ./examples/dom/graph.cpp
@example ./examples/dom/hflow.cpp
@example ./examples/dom/html_like.cpp
@example ./examples/dom/package_manager.cpp
@example ./examples/dom/paragraph.cpp
@example ./examples/dom/separator.cpp
@example ./examples/dom/size.cpp
@example ./examples/dom/spinner.cpp
@example ./examples/dom/style_blink.cpp
@example ./examples/dom/style_bold.cpp
@example ./examples/dom/style_color.cpp
@example ./examples/dom/style_dim.cpp
@example ./examples/dom/style_gallery.cpp
@example ./examples/dom/style_inverted.cpp
@example ./examples/dom/style_underlined.cpp
@example ./examples/dom/vbox_hbox.cpp
@example ./examples/dom/window.cpp
@example ./examples/util/print_key_press.cpp