summaryrefslogtreecommitdiff
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
parent9f1d7015cf326cf72febefc798f8f95eeaf76ff0 (diff)
downloadfork-ledger-2860b68bc2568dc67f9228377842c2eac14bf31a.tar.gz
fork-ledger-2860b68bc2568dc67f9228377842c2eac14bf31a.tar.bz2
fork-ledger-2860b68bc2568dc67f9228377842c2eac14bf31a.zip
clean up installation of doc files
-rwxr-xr-xacprep3
-rw-r--r--doc/CMakeLists.txt26
2 files changed, 10 insertions, 19 deletions
diff --git a/acprep b/acprep
index 7984f767..a6cadc7f 100755
--- a/acprep
+++ b/acprep
@@ -815,9 +815,6 @@ class PrepareBuild(CommandLineApp):
if self.options.boost_include:
conf_args.append('-DBOOST_INCLUDEDIR=%s' %
self.options.boost_include)
- if self.options.build_dir:
- conf_args.append('-DBUILD_DIR=%s' %
- self.options.build_dir)
if self.prefix_directory():
conf_args.append('-DCMAKE_INSTALL_PREFIX=%s' % self.prefix_directory())
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()