From 67b11f84ecd2f4685a32270ede9370fa1b4a9f60 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 11 Dec 2010 13:50:59 +0100 Subject: [PATCH] install conky documentation with a configurable path (-DDOC_PATH) (sf.net #3117859) patch contributed by Daniel Pielmeier (billie) --- CMakeLists.txt | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca0ab3e5..59a399b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,16 +49,24 @@ add_subdirectory(data) add_subdirectory(doc) add_subdirectory(src) -# Install README into share dir (is this even the right spot? need to revisit -# this at some point) -install(FILES - README - DESTINATION share/doc/conky -) +IF(NOT DEFINED DOC_PATH) + set(DOC_PATH "share/doc/${CPACK_PACKAGE_NAME}-${VERSION}") +ENDIF(NOT DEFINED DOC_PATH) +set(DOC_FILES extras/convert.lua data/conky_no_x11.conf data/conky.conf) -install(FILES - extras/convert.lua - DESTINATION share/doc/conky - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE -) +set(HTML_PATH "${DOC_PATH}/html") +set(HTML_FILES doc/config_settings.html doc/docs.html doc/lua.html doc/variables.html) + +set(MAN_PATH "share/man/man1") +set(MAN_FILES doc/conky.1) + +install(FILES ${DOC_FILES} + DESTINATION ${DOC_PATH}) + +if(MAINTAINER_MODE) + install(FILES ${HTML_FILES} + DESTINATION ${HTML_PATH}) + + install(FILES ${MAN_FILES} + DESTINATION ${MAN_PATH}) +endif(MAINTAINER_MODE)