~alan-griffiths/mir/revert-c2238

« back to all changes in this revision

Viewing changes to cmake/Doxygen.cmake

  • Committer: Alexandros Frantzis
  • Date: 2012-11-19 11:05:45 UTC
  • mto: This revision was merged to the branch mainline in revision 272.
  • Revision ID: alexandros.frantzis@canonical.com-20121119110545-g7l7q278en8e0f1n
doc,cmake: Add 'doc' make target

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright © 2012 Canonical Ltd.
 
2
#
 
3
# This program is free software: you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License version 3 as
 
5
# published by the Free Software Foundation.
 
6
#
 
7
# This program is distributed in the hope that it will be useful,
 
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
# GNU General Public License for more details.
 
11
#
 
12
# You should have received a copy of the GNU General Public License
 
13
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
14
#
 
15
# Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
 
16
 
 
17
 
 
18
# Check if doxygen is present and add 'make doc' target
 
19
find_package(Doxygen)
 
20
 
 
21
if(DOXYGEN_FOUND AND (DOXYGEN_VERSION VERSION_GREATER "1.8"))
 
22
  message(STATUS "doxygen ${DOXYGEN_VERSION} (>= 1.8.0) available - enabling make target doc")
 
23
  configure_file(doc/Doxyfile.in
 
24
                 ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
 
25
  add_custom_target(doc
 
26
                    COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
 
27
                    SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
 
28
endif()