diff options
author | Luca Muscariello <lumuscar+fdio@cisco.com> | 2017-02-23 17:01:02 +0100 |
---|---|---|
committer | Luca Muscariello <lumuscar+fdio@cisco.com> | 2017-02-23 17:21:02 +0100 |
commit | ec688b4723a041044226358bcd4dd6e2da39da49 (patch) | |
tree | 3a244c48d1eb9e4d90f9050fd1a61ae5c0327526 /longbow/documentation/CMakeLists.txt | |
parent | 9b30fc10fb1cbebe651e5a107e8ca5b24de54675 (diff) |
Initial commit: cframework. Longbow and Libparc
Change-Id: I90378dbd30da6033b20fb1f829b3b822cf366c59
Signed-off-by: Luca Muscariello <lumuscar+fdio@cisco.com>
Diffstat (limited to 'longbow/documentation/CMakeLists.txt')
-rw-r--r-- | longbow/documentation/CMakeLists.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/longbow/documentation/CMakeLists.txt b/longbow/documentation/CMakeLists.txt new file mode 100644 index 00000000..c25ffc16 --- /dev/null +++ b/longbow/documentation/CMakeLists.txt @@ -0,0 +1,45 @@ +find_package(Doxygen) + +if(DOXYGEN_FOUND) + set(PARC_REMOTE http://githubenterprise.parc.com/CCNX/LongBow) + set(GITHUB_REMOTE http://github.com/PARC/LongBow) + configure_file(longbow.doxygen.in config.doxygen @ONLY) + + install(DIRECTORY images/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/images) + install(DIRECTORY doxygen-extras/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/doxygen-extras) + install(DIRECTORY examples/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/examples) + install(FILES DoxygenLayout.xml DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + + set(HTML_PATH ${CMAKE_CURRENT_BINARY_DIR}/generated-documentation/html) + + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/documentation.tar + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/config.doxygen + COMMAND tar cf documentation.tar -C ${HTML_PATH} . + COMMENT "The file documentation.tar contains the HTML website suitable to update/replace the gh-pages branch of this repository." VERBATIM ) + + add_custom_target(documentation + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/documentation.tar + WORKING_DIRECTORY ${HTML_PATH}) + + add_custom_command(OUTPUT ${HTML_PATH}/.git/config + DEPENDS documentation + WORKING_DIRECTORY ${HTML_PATH} + COMMAND git init . + COMMAND git checkout -B gh-pages + COMMAND git add . + COMMAND git commit -am 'Override all previous versions' + COMMAND git remote add parc ${PARC_REMOTE} + COMMAND git remote add github ${GITHUB_REMOTE}) + + add_custom_target(documentation-install-parc + DEPENDS ${HTML_PATH}/.git/config + WORKING_DIRECTORY ${HTML_PATH} + COMMAND git push parc gh-pages -f) + + add_custom_target(documentation-install-github + DEPENDS ${HTML_PATH}/.git/config + WORKING_DIRECTORY ${HTML_PATH} + COMMAND git push github gh-pages -f) + +endif(DOXYGEN_FOUND) |