summaryrefslogtreecommitdiff
path: root/doc/CMakeLists.txt
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2014-09-09 21:15:11 +0200
committerJohann Klähn <kljohann@gmail.com>2014-09-10 00:40:36 +0200
commit2860b68bc2568dc67f9228377842c2eac14bf31a (patch)
tree33a32231beea41573e7b1dda812451c514de7f1e /doc/CMakeLists.txt
parent9f1d7015cf326cf72febefc798f8f95eeaf76ff0 (diff)
downloadfork-ledger-2860b68bc2568dc67f9228377842c2eac14bf31a.tar.gz
fork-ledger-2860b68bc2568dc67f9228377842c2eac14bf31a.tar.bz2
fork-ledger-2860b68bc2568dc67f9228377842c2eac14bf31a.zip
clean up installation of doc files
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r--doc/CMakeLists.txt26
1 files changed, 10 insertions, 16 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 3b96392a..6b8fa01e 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -113,22 +113,16 @@ if (CMAKE_INSTALL_MANDIR)
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT doc)
endif(CMAKE_INSTALL_MANDIR)
-foreach(file ${ledger_info_files})
- get_filename_component(file_base ${file} NAME_WE)
-
- 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()
+foreach(file ${ledger_doc_files})
+ get_filename_component(file_ext ${file} EXT)
- install(FILES ${doc_dir}/${file_base}.info
- DESTINATION ${CMAKE_INSTALL_INFODIR} COMPONENT doc)
- 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
+ if(file_ext STREQUAL ".info")
+ if(CMAKE_INSTALL_INFODIR)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}
+ DESTINATION ${CMAKE_INSTALL_INFODIR} COMPONENT doc)
+ endif()
+ elseif(CMAKE_INSTALL_DOCDIR)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}
DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc)
- endif(BUILD_WEB_DOCS)
+ endif()
endforeach()