Setup and clear of string pool.
[SquirrelJME.git] / nanocoat / cmake / doxygen.cmake
blob8e80381800ef547b4b725a6c044b1e7874001d1c
1 # ---------------------------------------------------------------------------
2 # SquirrelJME
3 #     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
4 # ---------------------------------------------------------------------------
5 # SquirrelJME is under the Mozilla Public License Version 2.0.
6 # See license.mkd for licensing and copyright information.
7 # ---------------------------------------------------------------------------
8 # DESCRIPTION: Support for Doxygen document generation
10 # Need to find doxygen first
11 find_package(Doxygen)
13 # Did we find it?
14 if(DOXYGEN_FOUND)
15         function(squirreljme_doxygen target)
16                 # Configure Doxygen inputs and outputs
17                 configure_file("${CMAKE_SOURCE_DIR}/cmake/Doxyfile.in"
18                         "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
20                 # Add target to build all the documentation
21                 add_custom_target(${target}Doxygen
22                         COMMAND "${DOXYGEN_EXECUTABLE}"
23                                 "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
24                         DEPENDS ${target}
25                         SOURCES "${CMAKE_SOURCE_DIR}/cmake/Doxyfile.in"
26                                 "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
27                         BYPRODUCTS "@CMAKE_CURRENT_BINARY_DIR@/docs/")
29                 # Do not run this by default
30                 set_target_properties(${target}Doxygen PROPERTIES
31                         EXCLUDE_FROM_ALL TRUE
32                         EXCLUDE_FROM_DEFAULT_BUILD TRUE)
33         endfunction()
34 else()
35         function(squirreljme_doxygen target)
36         endfunction()
37 endif()