Mercurial > irccd-www
changeset 7:5e018b977bbd
Copy irccd documentation
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 11 Feb 2016 13:17:56 +0100 |
parents | 1b6953be3a7b |
children | ebd8f6170cd4 |
files | CMakeLists.txt |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Wed Feb 10 09:01:13 2016 +0100 +++ b/CMakeLists.txt Thu Feb 11 13:17:56 2016 +0100 @@ -23,6 +23,14 @@ find_package(Pandoc REQUIRED) +set(WITH_IRCCDDOCDIR "" CACHE STRING "Location of irccd documentation directory") + +if (NOT WITH_IRCCDDOCDIR) + message(FATAL_ERROR "Please define WITH_IRCCDDOCDIR to the irccd's documentation output") +elseif (NOT EXISTS "${WITH_IRCCDDOCDIR}/guide.html") + message(FATAL_ERROR "Invalid directory given (did you build the documentation?)") +endif () + # Some variables set(TEMPLATE ${irccd-web_SOURCE_DIR}/templates/template.html) set(OUTPUT ${CMAKE_BINARY_DIR}/html) @@ -66,5 +74,13 @@ web ALL COMMENT "Generating website" + COMMAND ${CMAKE_COMMAND} -E copy ${WITH_IRCCDDOCDIR}/guide.html ${OUTPUT} + COMMAND ${CMAKE_COMMAND} -E copy_directory ${WITH_IRCCDDOCDIR}/css ${OUTPUT}/css + COMMAND ${CMAKE_COMMAND} -E copy_directory ${WITH_IRCCDDOCDIR}/api ${OUTPUT}/api + COMMAND ${CMAKE_COMMAND} -E copy_directory ${WITH_IRCCDDOCDIR}/plugin ${OUTPUT}/plugin DEPENDS files ) + +message("") +message("Don't forget to set WITH_WEB into the irccd's build directory !") +message("")