mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-19 19:52:15 +02:00
CMake: make doxygen generation work better
- Use CURRENT source and binary dir to make this work even if used as a sub-directory in another project. - Make USE_MDFILE_AS_MAINPAGE actually work. It is only used when part of the INPUT and does not automatically add it to INPUT. - Make sure CMake uses the latest version of README.rst by using configure_file instead of file(COPY). - Improve EXCLUDE_PATTERNS. - Add NUM_PROC_THREADS. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
This commit is contained in:
parent
cb589b70f0
commit
474de6c93f
@ -41,16 +41,17 @@ add_subdirectory(openvpn/ovpnagent/mac)
|
||||
if (ENABLE_DOXYGEN)
|
||||
# Exclude some project specific directories
|
||||
set(DOXYGEN_EXCLUDE_PATTERNS
|
||||
${CMAKE_BINARY_DIR}/test/unittests/googletest-*
|
||||
${PROJECT_SOURCE_DIR}/deps/*
|
||||
${PROJECT_SOURCE_DIR}/test/unittests/googletest-*)
|
||||
"*/vcpkg_installed/*"
|
||||
"*/googletest-src/*"
|
||||
"${PROJECT_SOURCE_DIR}/deps/*")
|
||||
|
||||
# Use README.rst as the Doxygen main page
|
||||
# Due to some doxygen oddities, it rejects processing README.rst, but a .md file is fine
|
||||
# So we copy it into our build tree as a .md file and use that
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/README.rst" DESTINATION "${CMAKE_BINARY_DIR}/doxygen")
|
||||
file(RENAME "${CMAKE_BINARY_DIR}/doxygen/README.rst" "${CMAKE_BINARY_DIR}/doxygen/mainpage.md")
|
||||
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE "${CMAKE_BINARY_DIR}/doxygen/mainpage.md")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/README.rst"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/doxygen/mainpage.md"
|
||||
COPYONLY)
|
||||
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE "${CMAKE_CURRENT_BINARY_DIR}/doxygen/mainpage.md")
|
||||
|
||||
configure_doxygen("OpenVPN 3 Core Library" "doxygen/core")
|
||||
endif ()
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user