From 526ef2e7c82742841cdd84221554040f30a22bf5 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Thu, 26 Mar 2015 18:32:37 +0100
Subject: [PATCH] ENH: prepare an archive of the generated doxygen, don't build
 it by default

---
 Utilities/Doxygen/CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index 79bbfd7115..c24ee194dc 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -146,9 +146,11 @@ if (BUILD_DOCUMENTATION)
   #  DEPENDS "${OTB_SOURCE_DIR}/Examples" "${OTB_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake"
   #  )
 
-  add_custom_target(Documentation ALL
+  add_custom_target(Documentation
     COMMAND ${DOXYGEN_EXECUTABLE} ${OTB_BINARY_DIR}/Utilities/Doxygen/doxygen.config
-    MAIN_DEPENDENCY ${OTB_BINARY_DIR}/Utilities/Doxygen/doxygen.config
+    COMMAND ${CMAKE_COMMAND} -E tar cjf
+      ${OTB_BINARY_DIR}/Documentation/Doxygen/OTB-Doxygen-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.tar.bz2
+      ${OTB_BINARY_DIR}/Documentation/Doxygen/html
     DEPENDS         ${OTB_BINARY_DIR}/Utilities/Doxygen/otbdoxygen.pl
    # DEPENDS         ${OTB_BINARY_DIR}/Documentation/Doxygen/Examples.dox
     WORKING_DIRECTORY ${OTB_BINARY_DIR}/Utilities/Doxygen
-- 
GitLab