Make documentation installable
If `make install` is run, the document is included if and only if it has already been built. If `make install-html` is run, then the documentation is always generated first, before installation. To build the documentation separately from installation use `make doc`
This commit is contained in:
parent
22dee20c9f
commit
8ce114df89
@ -238,4 +238,22 @@ if (DOXYGEN_FOUND)
|
||||
COMMENT "Generating API documentation with Doxygen"
|
||||
VERBATIM
|
||||
)
|
||||
set (_formats html pdf)
|
||||
foreach (format IN LISTS _formats)
|
||||
string (TOUPPER ${format} FORMAT)
|
||||
install (
|
||||
DIRECTORY ${PROJECT_BINARY_DIR}/Documentation/${format}
|
||||
DESTINATION share/doc/opm-core/
|
||||
COMPONENT ${format}
|
||||
OPTIONAL
|
||||
)
|
||||
# target to install just HTML documentation
|
||||
add_custom_target (install-${format}
|
||||
COMMAND ${CMAKE_COMMAND} -DCOMPONENT=${format} -P cmake_install.cmake
|
||||
COMMENT Installing ${FORMAT} documentation
|
||||
VERBATIM
|
||||
)
|
||||
# since the documentation is optional, it is not automatically built
|
||||
add_dependencies (install-${format} doc)
|
||||
endforeach (format)
|
||||
endif (DOXYGEN_FOUND)
|
||||
|
@ -1166,7 +1166,7 @@ GENERATE_LATEX = YES
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `latex' will be used as the default path.
|
||||
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_OUTPUT = pdf
|
||||
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked. If left blank `latex' will be used as the default command name.
|
||||
|
Loading…
Reference in New Issue
Block a user