From 355af9d476ce187bd11cd851b823a49a1b3face7 Mon Sep 17 00:00:00 2001
From: David Sarrut <david.sarrut@gmail.com>
Date: Fri, 3 Feb 2012 07:57:12 +0100
Subject: [PATCH] for vvToolROIManager, add link with gdcm-vtk

---
 vv/CMakeLists.txt | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt
index 0f95400..86f057e 100644
--- a/vv/CMakeLists.txt
+++ b/vv/CMakeLists.txt
@@ -17,19 +17,19 @@ SET(vv_TOOLS
   vvToolBinarize
   vvToolImageArithm
   vvToolResample
-#   vvToolExtractPatient
-#  vvToolExtractLung
-  vvToolStructureSetManager
   vvToolMIP
   vvToolConvert ## with dummy vvToolConvert.ui
   vvToolROIManager
   vvToolSegmentation
-
   ## these ones are for tests (not working)
   # vvToolFoo
   # vvToolFooWithWidgetBase
   # vvToolPlastimatch
   # vvToolConnectedComponentLabeling  
+  ## these ones are old ones
+  # vvToolExtractPatient
+  # vvToolExtractLung
+  # vvToolStructureSetManager
 )
 # dependencies of the tools
 # Future issues : when tool depend on other tools ... how to manage that ?
@@ -43,6 +43,7 @@ SET(vvToolCropImage_LIBS clitkCropImageLib)
 SET(vvToolMIP_LIBS clitkMIPLib)
 SET(vvToolMedianFilter_LIBS clitkMedianImageFilterLib)
 SET(vvToolImageArithm_LIBS clitkImageArithmImageLib)
+SET(vvToolROIManager_LIBS clitkDicomRTStruct)
 
 #=========================================================
 # List of vv source files
@@ -187,6 +188,15 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC)
 ENDIF(NOT APPLE)
 #=========================================================
 
+
+#=========================================================
+# for ITK4 + external GDCM (RT Struct)
+IF (CLITK_USE_SYSTEM_GDCM)
+  FIND_PACKAGE(GDCM REQUIRED)
+  INCLUDE(${GDCM_USE_FILE})
+ENDIF()
+
+
 #=========================================================
 INCLUDE_DIRECTORIES(
   ../common
@@ -195,11 +205,13 @@ INCLUDE_DIRECTORIES(
   )
 
 LINK_DIRECTORIES(${QT_LIBRARY_DIR})
+
 #=========================================================
 #Add each tool's dependencies
 foreach(tool ${vv_TOOLS})
   SET(toolLibs ${toolLibs} ${${tool}_LIBS})
 endforeach(tool)
+
 #=========================================================
 #Add Foundation Libraries (this should be after our libraries, since we depend
 #on them)
@@ -217,7 +229,7 @@ ENDIF(CLITK_EXPERIMENTAL)
 
 #=========================================================
 #Create binary and libs for tests
-SET(vvExternalLibs ${QT_QTNETWORK_LIBRARY} clitkSegmentationGgoLib clitkDicomRTStruct ${toolLibs} ${foundationLibraries} ${vvCxImage})
+SET(vvExternalLibs ${QT_QTNETWORK_LIBRARY} clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage})
 # QtNetwork is required by vvRegisterForm
 
 ADD_LIBRARY(vvLib ${vv_SRCS} ${vv_UI_CXX})
-- 
2.47.1