From dcb285ac556aa54aa01c60b3c1c9fa40199d8f06 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sun, 4 May 2014 01:17:02 +0200 Subject: Improve installation of documentation files - Install info version of ledger documentation instead of the original texinfo sources - Install html version of ledger documentation when BUILD_WEB_DOCS is ON - Enable installation of documentation files from --output directory --- doc/CMakeLists.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'doc/CMakeLists.txt') diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index e359c5e4..8a9ba2fd 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -120,8 +120,19 @@ endif(CMAKE_INSTALL_MANDIR) foreach(file ${info_files}) get_filename_component(file_base ${file} NAME_WE) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${file} + if (CMAKE_SOURCE_DIR STREQUAL BUILD_DIR) + set(doc_dir CMAKE_CURRENT_SOURCE_DIR) + else() + get_filename_component(dir_base ${CMAKE_CURRENT_SOURCE_DIR} NAME_WE) + set(doc_dir "${CMAKE_SOURCE_DIR}/${BUILD_DIR}/${dir_base}") + endif() + + install(FILES ${doc_dir}/${file_base}.info DESTINATION ${CMAKE_INSTALL_INFODIR} COMPONENT doc) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file_base}.pdf + install(FILES ${doc_dir}/${file_base}.pdf DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc OPTIONAL) + if (BUILD_WEB_DOCS) + install(FILES ${doc_dir}/${file_base}.html + DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc) + endif(BUILD_WEB_DOCS) endforeach() -- cgit v1.2.3