blob: 1b4479929b3f7ac95c90813730726dd0af8ee8db [file] [log] [blame]
piotr437f5462014-02-04 17:57:25 +01001# 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########################################################################
23file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} top_srcdir)
24file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} top_builddir)
25file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} abs_top_srcdir)
26file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} abs_top_builddir)
27
28set(HAVE_DOT ${DOXYGEN_DOT_FOUND})
29set(enable_html_docs YES)
30set(enable_latex_docs NO)
31set(enable_xml_docs YES)
32
33configure_file(
34 ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
35 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
36@ONLY)
37
38set(BUILT_DIRS ${CMAKE_CURRENT_BINARY_DIR}/xml ${CMAKE_CURRENT_BINARY_DIR}/html)
39
40########################################################################
41# Make and install doxygen docs
42########################################################################
43add_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
50add_custom_target(doxygen_target ALL DEPENDS ${BUILT_DIRS})
51
52install(DIRECTORY ${BUILT_DIRS} DESTINATION ${GR_PKG_DOC_DIR})