/usr/share/dune/cmake/modules/DuneDoxygen.cmake is in libdune-common-dev 2.3.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | # Module for building documentation using doxygen.
#
# provides the following macros:
#
# add_doxgen_target
#
# This macro creates a target for building (doxygen_${ProjectName}) and installing
# (doxygen_install_${ProjectName}) the generated doxygen documentation.
# The documentation is built during the top-level make doc call. We have added a dependency
# that makes sure it is built before running make install.
#
#
FIND_PACKAGE(Doxygen)
#
# Set DOT_TRUE for the Doxyfile generation.
#
if (NOT DOXYGEN_DOT_FOUND)
set(DOT_TRUE '\#')
endif (NOT DOXYGEN_DOT_FOUND)
add_custom_target(doxygen_install)
#
# prepare_doxyfile()
# This functions adds the necessary routines for the generation of the
# Doxyfile[.in] files needed to doxygen.
MACRO (prepare_doxyfile)
message(STATUS "using ${DOXYSTYLE_FILE} to create doxystyle file")
set(make_doxyfile_command ${CMAKE_COMMAND} -D DOT_TRUE=${DOT_TRUE} -D DUNEWEB_TRUE=\# -D ProjectName=${ProjectName} -D DUNE_MOD_VERSION=${DUNE_MOD_VERSION} -D DOXYSTYLE=${DOXYSTYLE_FILE} -D DOXYLOCAL=${CMAKE_CURRENT_SOURCE_DIR}/Doxylocal -D abs_top_srcdir=${CMAKE_SOURCE_DIR} -D srcdir=${CMAKE_CURRENT_SOURCE_DIR} -D top_srcdir=${CMAKE_SOURCE_DIR} -P ${SCRIPT_DIR}/CreateDoxyFile.cmake)
add_custom_command (OUTPUT Doxyfile.in Doxyfile
COMMAND ${make_doxyfile_command} COMMENT "Creating Doxyfile.in")
add_custom_target(Doxyfile DEPENDS Doxyfile.in Doxyfile)
ENDMACRO (prepare_doxyfile)
#
# add_doxgen_target
#
# This macro creates a target for building (doxygen_${ProjectName}) and installing
# (doxygen_install_${ProjectName}) the generated doxygen documentation.
# The documentation is built during the top-level make doc call. We have added a dependency
# that make sure it is built before running make install.
MACRO (add_doxygen_target)
dune_common_script_dir(SCRIPT_DIR)
if("${CMAKE_PROJECT_NAME}" STREQUAL "dune-common")
set(DOXYSTYLE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Doxystyle)
endif("${CMAKE_PROJECT_NAME}" STREQUAL "dune-common")
message(STATUS "Using scripts from ${SCRIPT_DIR} for creating doxygen stuff.")
set(_src_file _src_file-NOTFOUND)
find_file(_src_file index.html ${CMAKE_CURRENT_SOURCE_DIR}/html)
if(_src_file)
set(_src_dir ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_target(doxygen_${ProjectName})
else(_src_file)
if(DOXYGEN_FOUND)
prepare_doxyfile()
# A custom command that exectutes doxygen
add_custom_command(OUTPUT html COMMAND
${CMAKE_COMMAND} -D DOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE} -P ${SCRIPT_DIR}/RunDoxygen.cmake
COMMENT "Running doxygen documentation. This may take a while"
DEPENDS Doxyfile)
# Create a target for building the doxygen documentation of a module,
# that is run during make doc.
add_custom_target(doxygen_${ProjectName} DEPENDS html)
add_dependencies(doc doxygen_${ProjectName})
endif(DOXYGEN_FOUND)
set(_src_dir ${CMAKE_CURRENT_BINARY_DIR})
endif(_src_file)
# Use a cmake call to install the doxygen documentation and create a
# target for it
include(GNUInstallDirs)
# When installing call cmake install with the above install target
install(CODE
"execute_process(COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target doxygen_${ProjectName}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
file(GLOB doxygenfiles
GLOB ${_src_dir}/html/*.html
${_src_dir}/html/*.png
${_src_dir}/html/*.css
${_src_dir}/html/*.gif)
set(doxygenfiles \"\${doxygenfiles}\")
foreach(_file \${doxygenfiles})
get_filename_component(_basename \${_file} NAME)
LIST(APPEND CMAKE_INSTALL_MANIFEST_FILES ${CMAKE_INSTALL_FULL_DOCDIR}/doxygen/\${_basename})
endforeach(_file in \${doxygenfiles})
file(INSTALL \${doxygenfiles} DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR}/doxygen)
message(STATUS \"Installed doxygen into ${CMAKE_INSTALL_FULL_DOCDIR}/doxygen\")")
ENDMACRO (add_doxygen_target)
|