Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti committed Jul 15, 2024
1 parent 775ea68 commit 4371bb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 41 deletions.
23 changes: 1 addition & 22 deletions docs/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@
# Contact KDAB at <[email protected]> for commercial licensing options.
#

find_program(MKDOCS_EXECUTABLE mkdocs)
if(NOT MKDOCS_EXECUTABLE)
message(
FATAL_ERROR
"\nmkdocs (a project documentation tool using Markdown) could not be found. This tool is required to build the API documentation. Consider installing it by following the directions at https://www.mkdocs.org/user-guide/installation.\nAlso you'll need to 'pip install pymdown-extensions mkdocs-material'\nAlternatively, re-run cmake with the -D${PROJECT_NAME}_DOCS=False option."
)
endif()

# dot should come with Doxygen find_package(Doxygen)
if(DOXYGEN_DOT_EXECUTABLE)
set(HAVE_DOT "YES")
else()
# cmake-lint: disable=C0301
set(HAVE_DOT "NO")
message(
STATUS
Expand All @@ -32,7 +25,6 @@ set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})

# apidox generation using doxygen
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mkdocs/mkdocs.yml.cmake ${CMAKE_CURRENT_BINARY_DIR}/mkdocs/mkdocs.yml)

add_custom_target(
docs
Expand All @@ -42,24 +34,11 @@ add_custom_target(
# copy some files by-hand that are referred to by the markdown README.
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/LICENSES/MIT.txt
${DOXYGEN_OUTPUT_DIR}/mkdocs/docs/license.md
# Run MkDocs to build html documentation
COMMAND ${MKDOCS_EXECUTABLE} build --config-file "${DOXYGEN_OUTPUT_DIR}/mkdocs/mkdocs.yml" --site-dir
"${DOXYGEN_OUTPUT_DIR}/html"
DEPENDS ${_dox_deps} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Building Documentation"
)

add_custom_command(
TARGET docs
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan ""
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Built MkDocs documentation"
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan
"Use 'mkdocs serve' in the '${DOXYGEN_OUTPUT_DIR}/mkdocs' directory to view the documentation."
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan ""
VERBATIM
)
# The tags file is only created when 'make docs' is run first
if(EXISTS "${DOXYGEN_OUTPUT_DIR}/kdbindings.tags")
install(FILES ${DOXYGEN_OUTPUT_DIR}/kdbindings.tags DESTINATION ${INSTALL_DOC_DIR})
Expand Down
26 changes: 7 additions & 19 deletions docs/api/Doxyfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "KD SOAP API Documentation"
PROJECT_NAME = "@PROJECT_NAME@ API Documentation"

# 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
Expand Down Expand Up @@ -283,16 +283,7 @@ TAB_SIZE = 8
# with the commands \{ and \} for these it is advised to use the version @{ and
# @} or use a double escape (\\{ and \\})

ALIASES = "inv=\invariant" \
"since_l=\nThis library was introduced in KD SOAP" \
"since_c=\nThis class was introduced in KD SOAP" \
"since_d=\nThis macro was introduced in KD SOAP" \
"since_f=\nThis function was introduced in KD SOAP" \
"since_e=\nThis enumeration was introduced in KD SOAP" \
"since_p=\nThis property was introduced in KD SOAP" \
"since_v=\nThis enumeration value was introduced in KD SOAP" \
"since_t=\nThis typedef was introduced in KD SOAP" \
"reimp=\internal"
ALIASES = "reimp=Reimplemented for internal purposes.\n"

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
Expand Down Expand Up @@ -1046,7 +1037,7 @@ EXCLUDE_SYMBOLS = KDBindings::Private \
# that contain example code fragments that are included (see the \include
# command).

EXAMPLE_PATH = examples
EXAMPLE_PATH = "@CMAKE_SOURCE_DIR@/examples"

# 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
Expand Down Expand Up @@ -2361,7 +2352,8 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED =
PREDEFINED = "DOCTEST_SYMBOL_EXPORT=" \
"override=override"

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down Expand Up @@ -2399,17 +2391,13 @@ SKIP_FUNCTION_MACROS = YES
# the path). If a tag file is not located in the directory in which doxygen is
# run, you must also specify the path to the tagfile here.

TAGFILES = "@QDOC_TAG_DIR@/qtcore/qtcore.tags=https://doc.qt.io/qt-5/" \
"@QDOC_TAG_DIR@/qtgui/qtgui.tags=https://doc.qt.io/qt-5/" \
"@QDOC_TAG_DIR@/qtwidgets/qtwidgets.tags=https://doc.qt.io/qt-5/" \
"@QDOC_TAG_DIR@/qtnetwork/qtnetwork.tags=https://doc.qt.io/qt-5/" \
"@QDOC_TAG_DIR@/qtxml/qtxml.tags=https://doc.qt.io/qt-5/"
TAGFILES =

# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
# tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files.

GENERATE_TAGFILE = @DOXYGEN_OUTPUT_DIR@/kdbindings.tags
GENERATE_TAGFILE = "@DOXYGEN_OUTPUT_DIR@/kdbindings.tags"

# If the ALLEXTERNALS tag is set to YES, all external classes and namespaces
# will be listed in the class and namespace index. If set to NO, only the
Expand Down

0 comments on commit 4371bb7

Please sign in to comment.