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
|
message("")
message(STATUS "${BoldGreen}Starting configuration for the doc material for ${PROJECT_NAME} ${ColourReset}")
message("")
# We want to build the documentation in the binary directory, not in the
# source directory (mind the ${CMAKE_CURRENT_BINARY_DIR}).
# Prepare the logo picture files with the right version (configure_file)
configure_file(${CMAKE_SOURCE_DIR}/CMakeStuff/isospec_logo2_high.svg.in
${CMAKE_CURRENT_BINARY_DIR}/images/isospec_logo2_high_versioned.svg @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeStuff/isospec_logo2_long.svg.in
${CMAKE_CURRENT_BINARY_DIR}/images/isospec_logo2_long_versioned.svg @ONLY)
# Make the conversion of the svg file into a png, but only on GNU/Linux
# Produce a file with respected aspect ratio, 200 pixels wide.
if(UNIX AND NOT APPLE)
execute_process(COMMAND rsvg-convert -w 200 -f png -o
${CMAKE_CURRENT_BINARY_DIR}/images/isospec_logo2_high_versioned.png
${CMAKE_CURRENT_BINARY_DIR}/images/isospec_logo2_high_versioned.svg)
execute_process(COMMAND rsvg-convert -w 200 -f png -o
${CMAKE_CURRENT_BINARY_DIR}/images/isospec_logo2_long_versioned.png
${CMAKE_CURRENT_BINARY_DIR}/images/isospec_logo2_long_versioned.svg)
endif()
# Ensure that the doxyfile configuration file for Doxygen has always
# the proper version number!
configure_file(${CMAKE_SOURCE_DIR}/CMakeStuff/doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/doxyfile @ONLY)
add_custom_target(html_doc
COMMAND doxygen doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Doxygen-based developer html documentation generation")
add_custom_target(pdf_doc
COMMAND make
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/latex
COMMENT "Doxygen-based developer pdf documentation generation")
###############
# install stuff
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/images
DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/doc/isospec)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/doc/isospec)
# As of 20251020 the Doxygen-based generation of the pdf
# man page via pdflatex fails.
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/latex/refman.pdf
# DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/doc/isospec/pdf)
# Install the man pages
install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/man3
DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/
FILES_MATCHING
PATTERN "*.3"
)
message("")
message(STATUS "${BoldGreen}Finished configuration of the doc material.${ColourReset}")
message("")
|