aboutsummaryrefslogtreecommitdiff
path: root/doc/api/cplusplus/CMakeLists.txt
blob: 20281d2b47da754bb8f1269589ef383125719495 (plain)
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
36
37
38
39
40
add_subdirectory(examples)

set(DOXYGEN_TAG_FILE)
if(ENABLE_DOXYGEN_TAGS)
  set(DOXYGEN_TAG_FILE "${CMAKE_CURRENT_BINARY_DIR}/libstdc++.tag")
  file(DOWNLOAD
       "http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag"
       "${DOXYGEN_TAG_FILE}")
endif()

if(ENABLE_DOXYGEN)
  configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doxygen.conf.in"
                 "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf"
                 @ONLY)

  add_custom_command(COMMAND
                      "${DOXYGEN_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf"
                     DEPENDS
                       "${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf"
                       "${CMAKE_CURRENT_SOURCE_DIR}/groups.doxygen"
                       "${CMAKE_CURRENT_SOURCE_DIR}/main_page.doxygen"
                       "${CMAKE_CURRENT_SOURCE_DIR}/namespaces.doxygen"
                       "${CMAKE_CURRENT_SOURCE_DIR}/references.doxygen"
                       "${DOXYGEN_TAG_FILE}"
                     OUTPUT
                       "${CMAKE_CURRENT_BINARY_DIR}/cplusplus"
                     WORKING_DIRECTORY
                       "${CMAKE_CURRENT_SOURCE_DIR}")
  add_custom_target(c++-api-docs
                    ALL
                    DEPENDS
                      "${CMAKE_CURRENT_BINARY_DIR}/cplusplus")

  install(DIRECTORY
            "${CMAKE_CURRENT_BINARY_DIR}/cplusplus"
          DESTINATION
            "${CMAKE_INSTALL_FULL_HTMLDIR}/api")
endif()