Debian Codegraph @

c/docs/CMakeLists.txt

raw
1 #
2 # Licensed to the Apache Software Foundation (ASF) under one
3 # or more contributor license agreements. See the NOTICE file
4 # distributed with this work for additional information
5 # regarding copyright ownership. The ASF licenses this file
6 # to you under the Apache License, Version 2.0 (the
7 # "License"); you may not use this file except in compliance
8 # with the License. You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing,
13 # software distributed under the License is distributed on an
14 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 # KIND, either express or implied. See the License for the
16 # specific language governing permissions and limitations
17 # under the License.
18 #
19
20 find_package(Doxygen)
21
22 if (DOXYGEN_FOUND)
23 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/user.doxygen.in
24 ${CMAKE_CURRENT_BINARY_DIR}/user.doxygen)
25
26 file(GLOB docsrc ../include/proton/*.h *.md)
27 add_custom_target (docs-c COMMAND
28 COMMAND ${CMAKE_COMMAND} -E remove_directory html # get rid of old files
29 COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen
30 DEPENDS ${docsrc})
31
32 add_dependencies (docs docs-c)
33
34 # HTML files are generated to ./html - put those in the install.
35 install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/"
36 DESTINATION "${PROTON_SHARE}/docs/api-c"
37 COMPONENT documentation
38 OPTIONAL)
39
40 set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES html)
41 endif (DOXYGEN_FOUND)