diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2014-05-04 01:17:02 +0200 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2014-05-05 06:46:01 +0200 |
commit | dcb285ac556aa54aa01c60b3c1c9fa40199d8f06 (patch) | |
tree | fb3dee86044b5bde83690e5310904f5a61bb86df /doc/CMakeLists.txt | |
parent | 851dea238ac230d44c5df00dd738cee9aa5780d3 (diff) | |
download | fork-ledger-dcb285ac556aa54aa01c60b3c1c9fa40199d8f06.tar.gz fork-ledger-dcb285ac556aa54aa01c60b3c1c9fa40199d8f06.tar.bz2 fork-ledger-dcb285ac556aa54aa01c60b3c1c9fa40199d8f06.zip |
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
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r-- | doc/CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
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() |