From 4951184c1f1b9f31b2df0bc5b15dd4ab1c39990b Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 3 Feb 2012 07:57:12 +0100 Subject: [PATCH] Add libvtkgdcm to clitkDicomRTStructLib --- common/CMakeLists.txt | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index cd6af5b..672023e 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -81,14 +81,39 @@ ENDIF(CLITK_USE_SYSTEM_GDCM) TARGET_LINK_LIBRARIES(clitkCommon vtkCommon vtkImaging ${ITK_LIBRARIES} ${CLITK_GDCM_LIBRARIES}) -ADD_LIBRARY(clitkDicomRTStruct STATIC - clitkDicomRT_Contour.cxx - clitkDicomRT_ROI.cxx - clitkDicomRT_StructureSet.cxx - clitkDicomRTStruct2ImageFilter.cxx -) +IF (CLITK_USE_SYSTEM_GDCM) + DD(CLITK_USE_SYSTEM_GDCM) + FIND_PACKAGE(GDCM REQUIRED) + INCLUDE(${GDCM_USE_FILE}) + + FIND_LIBRARY(LIBVTKGDCM vtkgdcm ${GDCM_LIBRARY_DIRS}) + SET(GDCM_LIBRARIES ${LIBVTKGDCM}) + + DD(GDCM_USE_FILE) + DD(GDCM_LIBRARY_DIRS) + DD(GDCM_LIBRARIES) + + ADD_LIBRARY(clitkDicomRTStruct STATIC + clitkDicomRT_Contour.cxx + clitkDicomRT_ROI.cxx + clitkDicomRT_StructureSet.cxx + clitkDicomRTStruct2ImageFilter.cxx + vtkGDCMPolyDataReader.cxx + vtkGDCMPolyDataWriter.cxx + ) + TARGET_LINK_LIBRARIES(clitkDicomRTStruct ${ITK_LIBRARIES} ${GDCM_LIBRARIES}) + +ELSE() + ADD_LIBRARY(clitkDicomRTStruct STATIC + clitkDicomRT_Contour.cxx + clitkDicomRT_ROI.cxx + clitkDicomRT_StructureSet.cxx + clitkDicomRTStruct2ImageFilter.cxx + ) +ENDIF() + -TARGET_LINK_LIBRARIES(clitkDicomRTStruct vtkHybrid ${CLITK_GDCM_LIBRARIES}) +TARGET_LINK_LIBRARIES(clitkDicomRTStruct vtkHybrid ${CLITK_GDCM_LIBRARIES} ${GDCM_LIBRARIES} ) #ADD_LIBRARY(clitkCommonShared SHARED ${clitkCommon_SRC}) #SET_TARGET_PROPERTIES(clitkCommonShared PROPERTIES COMPILE_FLAGS -fPIC) -- 2.47.1