From b2854cb9078f65b2fade29e01b9cca4c649d64ab Mon Sep 17 00:00:00 2001
From: Manuel Grizonnet <manuel.grizonnet@gmail.com>
Date: Wed, 18 Aug 2010 10:36:03 +0200
Subject: [PATCH] ENH: OTB librairies build with the same shared/static options
 as external ITK

---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 06cc6a2b18..5ad62dfb85 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -213,6 +213,9 @@ IF(OTB_USE_EXTERNAL_ITK)
         MESSAGE(FATAL_ERROR
                   "Cannot build OTB project without ITK.  Please set ITK_DIR or set OTB_USE_EXTERNAL_ITK OFF to use INTERNAL ITK set on OTB/Utilities repository.")
   ENDIF(ITK_FOUND)
+  #Build shared libraries for otb
+  #By default, if otb use an external itk import the option from the ITK configuration
+  SET(BUILD_SHARED_LIBS ${ITK_BUILD_SHARED})
 ELSE(OTB_USE_EXTERNAL_ITK)
 # Required to have proper itk headers at first run
 SET(ITK_SOURCE_DIR ${OTB_SOURCE_DIR}/Utilities/ITK)
-- 
GitLab