From 47fbcf8ebd8ee7ff6d95eef67aa8e0831e7615e2 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Tue, 31 Mar 2015 14:29:29 +0200
Subject: [PATCH] BUG: fix doxygen archive

---
 Utilities/Doxygen/CMakeLists.txt    | 16 ++++++++++++----
 Utilities/Doxygen/doxygen.config.in |  2 +-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index c24ee194dc..78aeb77530 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -146,15 +146,23 @@ if (BUILD_DOCUMENTATION)
   #  DEPENDS "${OTB_SOURCE_DIR}/Examples" "${OTB_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake"
   #  )
 
-  add_custom_target(Documentation
+  add_custom_target(Documentation-doxygen
     COMMAND ${DOXYGEN_EXECUTABLE} ${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
+    #COMMAND ${CMAKE_COMMAND} -E copy
+    #  ${OTB_SOURCE_DIR}/Utilities/Doxygen/favicon.ico
+    #  ${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
     )
+  
+  add_custom_target(Documentation
+    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 Documentation-doxygen
+    WORKING_DIRECTORY ${OTB_BINARY_DIR}/Documentation/Doxygen
+    )
 
   # Somehow the logo image is not copied into the html folder.
   # Here we ensure that the logo image ends up in the right directory
diff --git a/Utilities/Doxygen/doxygen.config.in b/Utilities/Doxygen/doxygen.config.in
index fa8b1e73b8..144eb2ef2a 100644
--- a/Utilities/Doxygen/doxygen.config.in
+++ b/Utilities/Doxygen/doxygen.config.in
@@ -1099,7 +1099,7 @@ HTML_EXTRA_STYLESHEET  = "@OTB_SOURCE_DIR@/Utilities/Doxygen/DoxygenStyle.css"
 # files will be copied as-is; there are no commands or markers available.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_EXTRA_FILES       =
+HTML_EXTRA_FILES       = "@OTB_SOURCE_DIR@/Utilities/Doxygen/favicon.ico"
 
 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
 # will adjust the colors in the stylesheet and background images according to
-- 
GitLab