piotr | 437f546 | 2014-02-04 17:57:25 +0100 | [diff] [blame] | 1 | # Copyright 2011 Free Software Foundation, Inc. |
| 2 | # |
| 3 | # This file is part of GNU Radio |
| 4 | # |
| 5 | # GNU Radio is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 3, or (at your option) |
| 8 | # any later version. |
| 9 | # |
| 10 | # GNU Radio is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU General Public License |
| 16 | # along with GNU Radio; see the file COPYING. If not, write to |
| 17 | # the Free Software Foundation, Inc., 51 Franklin Street, |
| 18 | # Boston, MA 02110-1301, USA. |
| 19 | |
| 20 | ######################################################################## |
| 21 | # Create the doxygen configuration file |
| 22 | ######################################################################## |
| 23 | file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir) |
| 24 | file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir) |
| 25 | file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} abs_top_srcdir) |
| 26 | file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} abs_top_builddir) |
| 27 | |
| 28 | set(HAVE_DOT ${DOXYGEN_DOT_FOUND}) |
| 29 | set(enable_html_docs YES) |
| 30 | set(enable_latex_docs NO) |
| 31 | set(enable_xml_docs YES) |
| 32 | |
| 33 | configure_file( |
| 34 | ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in |
| 35 | ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile |
| 36 | @ONLY) |
| 37 | |
| 38 | set(BUILT_DIRS ${CMAKE_CURRENT_BINARY_DIR}/xml ${CMAKE_CURRENT_BINARY_DIR}/html) |
| 39 | |
| 40 | ######################################################################## |
| 41 | # Make and install doxygen docs |
| 42 | ######################################################################## |
| 43 | add_custom_command( |
| 44 | OUTPUT ${BUILT_DIRS} |
| 45 | COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile |
| 46 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
| 47 | COMMENT "Generating documentation with doxygen" |
| 48 | ) |
| 49 | |
| 50 | add_custom_target(doxygen_target ALL DEPENDS ${BUILT_DIRS}) |
| 51 | |
| 52 | install(DIRECTORY ${BUILT_DIRS} DESTINATION ${GR_PKG_DOC_DIR}) |