mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 13:24:48 +00:00
Switch to Doxygen
clang-doc is nice and good, but there are features missing such as the ability to manually create a reference (link)...
This commit is contained in:
parent
4d915227f7
commit
462d73ccdc
3 changed files with 2575 additions and 19 deletions
|
@ -83,20 +83,8 @@ install(FILES
|
|||
DESTINATION lib/cmake/SixtyFPS
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
execute_process(COMMAND brew --prefix llvm RESULT_VARIABLE prefix_status OUTPUT_VARIABLE llvm_prefix ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(prefix_status EQUAL "0")
|
||||
set(clang_doc_hint "HINTS;${llvm_prefix}/bin")
|
||||
endif()
|
||||
find_package(Doxygen)
|
||||
if (DOXYGEN_FOUND)
|
||||
configure_file(Doxyfile.in Doxyfile)
|
||||
add_custom_target(docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
endif()
|
||||
|
||||
find_program(clang_doc NAMES clang-doc clang-doc-10 ${clang_doc_hint})
|
||||
if(clang_doc)
|
||||
message(STATUS "Clang doc found at ${clang_doc}. Will build API documentation")
|
||||
add_library(api_docs lib.cpp)
|
||||
target_link_libraries(api_docs SixtyFPS)
|
||||
add_custom_target(docs ALL COMMAND ${clang_doc} -p ${CMAKE_CURRENT_BINARY_DIR} --format=html --public --project-name "SixtyFPS C++" ${CMAKE_CURRENT_SOURCE_DIR}/lib.cpp)
|
||||
else()
|
||||
message(STATUS "Clang doc NOT found. Will NOT build API documentation")
|
||||
add_custom_target(docs COMMAND ${CMAKE} -E echo "Not building documentation because clang-doc wasn't found in PATH")
|
||||
endif()
|
2568
api/sixtyfps-cpp/cmake/Doxyfile.in
Normal file
2568
api/sixtyfps-cpp/cmake/Doxyfile.in
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue