From 60ba45c45360d3f15272dc79c49c8c6b45ccbcc4 Mon Sep 17 00:00:00 2001
From: Julien Malik <julien.malik@c-s.fr>
Date: Wed, 8 Jun 2011 23:42:58 +0200
Subject: [PATCH] BUG: fix proper dependencies in build system

---
 Code/Wrappers/SWIG/CMakeLists.txt | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Code/Wrappers/SWIG/CMakeLists.txt b/Code/Wrappers/SWIG/CMakeLists.txt
index eb2ae26e93..07b663a6d8 100644
--- a/Code/Wrappers/SWIG/CMakeLists.txt
+++ b/Code/Wrappers/SWIG/CMakeLists.txt
@@ -8,14 +8,12 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
 SET(CMAKE_SWIG_FLAGS "")
 
 FILE(GLOB swigfiles "*.i")
-
 FOREACH(swigfile ${swigfiles})
-
     SET_SOURCE_FILES_PROPERTIES(${swigfile} PROPERTIES CPLUSPLUS ON)
     SET_SOURCE_FILES_PROPERTIES(${swigfile} PROPERTIES SWIG_FLAGS "-includeall")
-
 ENDFOREACH(swigfile ${swigfiles})
 
-# TODO: add build dependency with the macro files
-SWIG_ADD_MODULE(otbApplication python otbApplication.i)
+set(SWIG_MODULE_otbApplication_EXTRA_DEPS itkBase.i itkMacro.i RefCountMacro.i)
+
+SWIG_ADD_MODULE(otbApplication python otbApplication.i )
 SWIG_LINK_LIBRARIES(otbApplication ${PYTHON_LIBRARIES} OTBWrapperCore)
-- 
GitLab