Skip to content
Snippets Groups Projects
Commit 1de4fb17 authored by Markus Blatt's avatar Markus Blatt
Browse files

- Make doc installation script more flexible such that other

 documentation besides doxygen can be installed.
- Make sure we install under ${CMAKE_INSTALL_PREFIX}. Therefore
  we must provide the absolute path to our custom install script.
- Include DuneDoc at toplevel and let create the doc target. Thus
  we can use its macros all over the place.

[[Imported from SVN: r6626]]
parent 111658c7
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,9 @@ add_definitions(-DHAVE_CONFIG_H)
include(DUNEDoxygen)
# Create custom target for building the documentation
add_custom_target(doc)
# and provide macros for installing the docs and force
# building them before.
include(DUNEDoc)
# Create a custom target for building the tests.
# Thus they will not be built by make all any more.
......
# Module that provides a custom target make doc at the top level
# directory and utility macros for creating install directives
# that make sure that the files to be installed are previously
# generated even if make doc was not called.
#
add_custom_target(doc)
MACRO(create_doc_install filename targetdir)
get_filename_component(targetfile ${filename} NAME)
set(install_command ${CMAKE_COMMAND} -D FILE=${filename} -D DIR=${CMAKE_INSTALL_PREFIX}/${targetdir} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallFile.cmake)
# create a custom target for the installation
add_custom_target(install_${targetfile} ${install_command}
COMMENT "Installing ${filename} to ${targetdir}"
DEPENDS ${filename})
# When installing call cmake install with the above install target
install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_BINARY_DIR}\" --target install_${targetfile} )")
ENDMACRO(create_doc_install)
......@@ -39,7 +39,7 @@ MACRO (add_doxygen_target)
add_dependencies(doc doxygen_${DUNE_MOD_NAME})
# Use a cmake call to install the doxygen documentation and create a target for it
set(install_doxygen_command ${CMAKE_COMMAND} -D CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -D DUNE_MOD_NAME=${DUNE_MOD_NAME} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallDoxygen.cmake)
set(install_doxygen_command ${CMAKE_COMMAND} -D FILE=${CMAKE_CURRENT_BINARY_DIR}/html -D DIR=${CMAKE_INSTALL_PREFIX}/share/doc/${DUNE_MOD_NAME}/doxygen -P ${CMAKE_SOURCE_DIR}/cmake/scripts/InstallFile.cmake)
add_custom_target(doxygen_install_${DUNE_MOD_NAME}
${install_doxygen_command}
COMMENT "Installing doxygen documentation"
......
file(INSTALL ${CMAKE_CURRENT_BINARY_DIR}/html
DESTINATION share/doc/${DUNE_MOD_NAME}/doxygen)
file(INSTALL ${FILE}
DESTINATION ${DIR})
include(UseLATEX)
ADD_LATEX_DOCUMENT(buildsystem.tex FATHER_TARGET doc DEFAULT_PDF INPUTS ../Makefile.am ../../configure.ac ../example.opts)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/buildsystem.pdf
DESTINATION share/doc/dune-common/buildsystem)
create_doc_install(${CMAKE_CURRENT_BINARY_DIR}/buildsystem.pdf share/doc/dune-common/buildsystem)
#add_custom_target(install_buildsystem)
#install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" --build \"${CMAKE_BINARY_DIR}\" --target buildsystem_install )")
#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/buildsystem.pdf
# DESTINATION share/doc/dune-common/buildsystem)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment