From 7894fcf257e37577fa7129931f90d3b70c2f62e9 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Tue, 24 Mar 2015 18:19:31 +0100
Subject: [PATCH] ENH: support ITK tagfile

---
 Utilities/Doxygen/CMakeLists.txt    | 9 +++++++++
 Utilities/Doxygen/doxygen.config.in | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt
index 878f450c2c..79bbfd7115 100644
--- a/Utilities/Doxygen/CMakeLists.txt
+++ b/Utilities/Doxygen/CMakeLists.txt
@@ -93,6 +93,15 @@ foreach( var ${OTB_DOXYGEN_OUTPUT} )
   endif()
 endforeach()
 
+set(OTB_DOXYGEN_ITK_TAGFILE "" CACHE FILEPATH "Tagfile containing ITK doxygen")
+set(OTB_DOXYGEN_ITK_DOXYGEN_URL "" CACHE STRING "URL to ITK doxygen")
+
+if(("${OTB_DOXYGEN_ITK_TAGFILE}" STREQUAL "") OR ("${OTB_DOXYGEN_ITK_DOXYGEN_URL}" STREQUAL ""))
+  set(OTB_DOXYGEN_TAGFILE_FIELD "")
+else()
+  set(OTB_DOXYGEN_TAGFILE_FIELD "${OTB_DOXYGEN_ITK_TAGFILE}=${OTB_DOXYGEN_ITK_DOXYGEN_URL}")
+endif()
+
 find_package( Perl )
 
 if( PERL_FOUND )
diff --git a/Utilities/Doxygen/doxygen.config.in b/Utilities/Doxygen/doxygen.config.in
index 51314803ea..fa8b1e73b8 100644
--- a/Utilities/Doxygen/doxygen.config.in
+++ b/Utilities/Doxygen/doxygen.config.in
@@ -2055,7 +2055,7 @@ SKIP_FUNCTION_MACROS   = YES
 # the path). If a tag file is not located in the directory in which doxygen is
 # run, you must also specify the path to the tagfile here.
 
-TAGFILES               =
+TAGFILES               = @OTB_DOXYGEN_TAGFILE_FIELD@
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create a
 # tag file that is based on the input files it reads. See section "Linking to
-- 
GitLab