From bf92600595f1567be3d63b2e5cf76cd45e6014b8 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 20 Feb 2013 14:18:20 +0100 Subject: [PATCH] Enable customization of class doc. dir. name Distributions have various conventions for this, so the package must be able to tell where it wants the class doc. to be put for the `install` target. --- cmake/Modules/OpmDoc.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/OpmDoc.cmake b/cmake/Modules/OpmDoc.cmake index 1c02b2a8..6d17a59e 100644 --- a/cmake/Modules/OpmDoc.cmake +++ b/cmake/Modules/OpmDoc.cmake @@ -26,12 +26,17 @@ macro (opm_doc opm docu_dir) COMMENT "Generating API documentation with Doxygen" VERBATIM ) + # distributions have various naming conventions; this enables the packager + # to direct where the install target should put the documentation. the names + # here are taken from GNUInstallDirs.cmake + option (CMAKE_INSTALL_DATAROOTDIR "Read-only arch.-indep. data root" "share") + option (CMAKE_INSTALL_DOCDIR "Documentation root" "${CMAKE_INSTALL_DATAROOTDIR}/doc/${${opm}_NAME}") set (_formats html) foreach (format IN LISTS _formats) string (TOUPPER ${format} FORMAT) install ( DIRECTORY ${PROJECT_BINARY_DIR}/${docu_dir}/${format} - DESTINATION share/doc/${${opm}_NAME} + DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT ${format} OPTIONAL )