summaryrefslogtreecommitdiff
path: root/doc/CMakeLists.txt
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2013-01-14 22:38:30 +0100
committerJohann Klähn <kljohann@gmail.com>2013-01-14 22:59:35 +0100
commitdd105fecd79d1c7e6fb3e22ace19b1359dd7de3b (patch)
treef02358f1ace87ca95e045a4a193786620c030e94 /doc/CMakeLists.txt
parentc88862fd66489fa8c06d06d3876b2c0f59dff3a5 (diff)
downloadfork-ledger-dd105fecd79d1c7e6fb3e22ace19b1359dd7de3b.tar.gz
fork-ledger-dd105fecd79d1c7e6fb3e22ace19b1359dd7de3b.tar.bz2
fork-ledger-dd105fecd79d1c7e6fb3e22ace19b1359dd7de3b.zip
fix issue for separate build dir
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r--doc/CMakeLists.txt18
1 files changed, 8 insertions, 10 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index b50c8696..a817c151 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -14,8 +14,8 @@ foreach(file ${info_files})
endif()
add_custom_command(OUTPUT ${file_base}.html
- COMMAND makeinfo --force --html --no-split -o ${file_base}.html ${file}
- DEPENDS ${file}
+ COMMAND makeinfo --force --html --no-split -o ${file_base}.html ${CMAKE_CURRENT_SOURCE_DIR}/${file}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
VERBATIM)
list(APPEND ledger_doc_files ${file_base}.html)
endif(BUILD_WEB_DOCS)
@@ -23,11 +23,9 @@ foreach(file ${info_files})
if(NOT TEXI2PDF)
mesage(WARNING "Could not find texi2pdf. PDF version of documentation will not be built.")
else()
- get_filename_component(file_base ${file} NAME_WE)
add_custom_command(OUTPUT ${file_base}.pdf
- COMMAND texi2pdf -b -q ${file}
- COMMAND rm -f ${file_base}.aux ${file_base}.cp ${file_base}.fn ${file_base}.ky ${file_base}.log ${file_base}.pg ${file_base}.toc ${file_base}.tp ${file_base}.vr
- DEPENDS ${file}
+ COMMAND texi2pdf -b -q --tidy -o ${file_base}.pdf ${CMAKE_CURRENT_SOURCE_DIR}/${file}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file}
VERBATIM)
list(APPEND ledger_doc_files ${file_base}.pdf)
endif()
@@ -45,8 +43,8 @@ if(BUILD_WEB_DOCS)
endif()
add_custom_command(OUTPUT ledger.1.html
- COMMAND ${BASH} -c "man2html ledger.1 | tail -n+3 > ledger.1.html"
- DEPENDS ledger.1
+ COMMAND ${BASH} -c "man2html $<1:CMAKE_CURRENT_SOURCE_DIR>/ledger.1 | tail -n+3 > ledger.1.html"
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ledger.1
VERBATIM)
list(APPEND ledger_doc_files ledger.1.html)
endif(BUILD_WEB_DOCS)
@@ -60,14 +58,14 @@ add_custom_target(doc ALL DEPENDS ${ledger_doc_files})
include(GNUInstallDirs)
if(CMAKE_INSTALL_MANDIR)
- install(FILES ledger.1
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ledger.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT doc)
endif(CMAKE_INSTALL_MANDIR)
if(CMAKE_INSTALL_DOCDIR)
foreach(file ${info_files})
get_filename_component(file_base ${file} NAME_WE)
- install(FILES ${file_base}.pdf
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file_base}.pdf
DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT doc OPTIONAL)
endforeach()
endif(CMAKE_INSTALL_DOCDIR)