-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (33 loc) · 1.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
if(NOT BUILD_DOCS)
return()
endif()
include(GNUInstallDirs)
find_package(Doxygen MODULE COMPONENTS doxygen dot)
if(DOXYGEN_FOUND)
find_package(Java MODULE COMPONENTS Runtime)
if(Java_Runtime_FOUND)
if(NOT PLANTUML_JAR)
include(UseJava)
find_jar(PLANTUML_JAR plantuml PATHS /usr/share/plantuml)
mark_as_advanced(PLANTUML_JAR)
if(PLANTUML_JAR)
message(STATUS "Found PlantUML: ${PLANTUML_JAR}")
else()
message(STATUS "Could NOT find PlantUML")
endif()
endif()
get_filename_component(PLANTUML_JAR_PATH "${PLANTUML_JAR}" DIRECTORY)
file(TO_NATIVE_PATH "${PLANTUML_JAR_PATH}" PLANTUML_JAR_PATH)
endif()
if(DOXYGEN_DOT_FOUND)
get_filename_component(DOXYGEN_DOT_PATH Doxygen::dot DIRECTORY)
file(TO_NATIVE_PATH ${DOXYGEN_DOT_PATH} DOXYGEN_DOT_PATH)
endif()
configure_file(Doxyfile.in Doxyfile @ONLY)
add_custom_target(doc
COMMAND Doxygen::doxygen Doxyfile >doxygen.log
COMMENT "Generating ${PROJECT_NAME} documentation")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html"
DESTINATION "${CMAKE_INSTALL_DOCDIR}"
OPTIONAL)
endif()