Michael Gottesman | 1ab6c6c | 2013-08-28 20:29:40 +0000 | [diff] [blame] | 1 | |
| 2 | if (DOXYGEN_FOUND) |
| 3 | if (LLVM_ENABLE_DOXYGEN) |
Michael Gottesman | 855baa6 | 2013-08-28 20:29:44 +0000 | [diff] [blame] | 4 | set(abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR}) |
Michael Gottesman | 44d971c | 2013-08-28 21:55:41 +0000 | [diff] [blame] | 5 | set(abs_builddir ${CMAKE_CURRENT_BINARY_DIR}) |
Michael Gottesman | 1ab6c6c | 2013-08-28 20:29:40 +0000 | [diff] [blame] | 6 | |
| 7 | if (HAVE_DOT) |
| 8 | set(DOT ${LLVM_PATH_DOT}) |
| 9 | endif() |
| 10 | |
Michael Gottesman | 44d971c | 2013-08-28 21:55:41 +0000 | [diff] [blame] | 11 | if (LLVM_DOXYGEN_EXTERNAL_SEARCH) |
| 12 | set(enable_searchengine "YES") |
| 13 | set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}") |
| 14 | set(enable_server_based_search "YES") |
| 15 | set(enable_external_search "YES") |
| 16 | set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}") |
Michael Gottesman | 855baa6 | 2013-08-28 20:29:44 +0000 | [diff] [blame] | 17 | else() |
Michael Gottesman | 44d971c | 2013-08-28 21:55:41 +0000 | [diff] [blame] | 18 | set(enable_searchengine "NO") |
| 19 | set(searchengine_url "") |
| 20 | set(enable_server_based_search "NO") |
| 21 | set(enable_external_search "NO") |
| 22 | set(extra_search_mappings "") |
Michael Gottesman | 855baa6 | 2013-08-28 20:29:44 +0000 | [diff] [blame] | 23 | endif() |
| 24 | |
Michael Gottesman | 1ab6c6c | 2013-08-28 20:29:40 +0000 | [diff] [blame] | 25 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in |
| 26 | ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) |
Michael Gottesman | 44d971c | 2013-08-28 21:55:41 +0000 | [diff] [blame] | 27 | |
| 28 | set(abs_top_srcdir) |
| 29 | set(abs_top_builddir) |
Michael Gottesman | 1ab6c6c | 2013-08-28 20:29:40 +0000 | [diff] [blame] | 30 | set(DOT) |
Michael Gottesman | 44d971c | 2013-08-28 21:55:41 +0000 | [diff] [blame] | 31 | set(enable_searchengine) |
| 32 | set(searchengine_url) |
| 33 | set(enable_server_based_search) |
| 34 | set(enable_external_search) |
| 35 | set(extra_search_mappings) |
Michael Gottesman | 1ab6c6c | 2013-08-28 20:29:40 +0000 | [diff] [blame] | 36 | |
| 37 | add_custom_target(doxygen-clang |
| 38 | COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg |
| 39 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
| 40 | COMMENT "Generating clang doxygen documentation." VERBATIM) |
| 41 | |
| 42 | if (LLVM_BUILD_DOCS) |
| 43 | add_dependencies(doxygen doxygen-clang) |
| 44 | endif() |
| 45 | |
| 46 | if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) |
| 47 | install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html |
| 48 | DESTINATION docs/html) |
| 49 | endif() |
| 50 | endif() |
| 51 | endif() |