2 if (LLVM_ENABLE_DOXYGEN)
3 set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
4 set(abs_builddir ${CMAKE_CURRENT_BINARY_DIR})
7 set(DOT ${LLVM_PATH_DOT})
10 if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
11 set(enable_searchengine "YES")
12 set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}")
13 set(enable_server_based_search "YES")
14 set(enable_external_search "YES")
15 set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}")
17 set(enable_searchengine "NO")
18 set(searchengine_url "")
19 set(enable_server_based_search "NO")
20 set(enable_external_search "NO")
21 set(extra_search_mappings "")
24 # If asked, configure doxygen for the creation of a Qt Compressed Help file.
25 if (LLVM_ENABLE_DOXYGEN_QT_HELP)
26 set(CLANG_TOOLS_DOXYGEN_QCH_FILENAME "org.llvm.clang.qch" CACHE STRING
27 "Filename of the Qt Compressed help file")
28 set(CLANG_TOOLS_DOXYGEN_QHP_NAMESPACE "org.llvm.clang" CACHE STRING
29 "Namespace under which the intermediate Qt Help Project file lives")
30 set(CLANG_TOOLS_DOXYGEN_QHP_CUST_FILTER_NAME "Clang ${CLANG_VERSION}" CACHE STRING
31 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
32 set(CLANG_TOOLS_DOXYGEN_QHP_CUST_FILTER_ATTRS "Clang,${CLANG_VERSION}" CACHE STRING
33 "See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
34 set(clang_tools_doxygen_generate_qhp "YES")
35 set(clang_tools_doxygen_qch_filename "${CLANG_DOXYGEN_QCH_FILENAME}")
36 set(clang_tools_doxygen_qhp_namespace "${CLANG_DOXYGEN_QHP_NAMESPACE}")
37 set(clang_tools_doxygen_qhelpgenerator_path "${LLVM_DOXYGEN_QHELPGENERATOR_PATH}")
38 set(clang_tools_doxygen_qhp_cust_filter_name "${CLANG_DOXYGEN_QHP_CUST_FILTER_NAME}")
39 set(clang_tools_doxygen_qhp_cust_filter_attrs "${CLANG_DOXYGEN_QHP_CUST_FILTER_ATTRS}")
41 set(clang_tools_doxygen_generate_qhp "NO")
42 set(clang_tools_doxygen_qch_filename "")
43 set(clang_tools_doxygen_qhp_namespace "")
44 set(clang_tools_doxygen_qhelpgenerator_path "")
45 set(clang_tools_doxygen_qhp_cust_filter_name "")
46 set(clang_tools_doxygen_qhp_cust_filter_attrs "")
49 option(LLVM_DOXYGEN_SVG
50 "Use svg instead of png files for doxygen graphs." OFF)
52 set(DOT_IMAGE_FORMAT "svg")
54 set(DOT_IMAGE_FORMAT "png")
57 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
58 ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
63 set(enable_searchengine)
65 set(enable_server_based_search)
66 set(enable_external_search)
67 set(extra_search_mappings)
68 set(clang_tools_doxygen_generate_qhp)
69 set(clang_tools_doxygen_qch_filename)
70 set(clang_tools_doxygen_qhp_namespace)
71 set(clang_tools_doxygen_qhelpgenerator_path)
72 set(clang_tools_doxygen_qhp_cust_filter_name)
73 set(clang_tools_doxygen_qhp_cust_filter_attrs)
76 add_custom_target(doxygen-clang-tools
77 COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
78 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
79 COMMENT "Generating clang doxygen documentation." VERBATIM)
80 set_target_properties(doxygen-clang-tools PROPERTIES FOLDER "Clang Tools Extra/Docs")
83 add_dependencies(doxygen doxygen-clang-tools)
86 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
87 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
88 DESTINATION docs/html)
93 if (LLVM_ENABLE_SPHINX)
94 include(AddSphinxTarget)
96 if (${SPHINX_OUTPUT_HTML})
97 add_sphinx_target(html clang-tools)
99 if (${SPHINX_OUTPUT_MAN})
100 add_sphinx_target(man clang-tools)