]> Creatis software - crea.git/commitdiff
#3399 gdcm1 -> gdcm2 v3.3.0
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 18 May 2026 14:56:39 +0000 (16:56 +0200)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 18 May 2026 14:56:39 +0000 (16:56 +0200)
cmake/CREAMacro_FindAndUseLibraries.cmake

index 94dccc0560b4910af215ff2f5d7c19f6cad3713d..0b3d133880066c29361211b48df820c1c78605b0 100644 (file)
@@ -186,7 +186,7 @@ ENDIF(USE_ITK)
 
 #-----------------------------------------------------------------------------
 
-IF(USE_GDCM)
+IF(USE_GDCM_UPS_EED)
   IF (USE_GDCM2)
     MESSAGE(ERROR "CANNOT USE BOTH gdcm AND gdcm2 !")
   ENDIF (USE_GDCM2)
@@ -234,7 +234,7 @@ IF(USE_GDCM)
     ENDIF(GDCM_FOUND)
 
   ENDIF(NOT GDCM_FOUND)
-ENDIF(USE_GDCM)
+ENDIF(USE_GDCM_UPS_EED)
 
 #-----------------------------------------------------------------------------
 
@@ -242,6 +242,16 @@ IF(USE_GDCM2)
   IF (USE_GDCM)
     MESSAGE(ERROR "CANNOT USE BOTH gdcm AND gdcm2 !")
   ENDIF (USE_GDCM)
+  CREA_DEFINE( USE_GDCM2 )
+ENDIF(USE_GDCM2)
+
+#-----------------------------------------------------------------------------
+
+
+IF(USE_GDCM2_UPS_EED)
+  IF (USE_GDCM)
+    MESSAGE(ERROR "CANNOT USE BOTH gdcm AND gdcm2 !")
+  ENDIF (USE_GDCM)
 
 #  IF(NOT USE_ITK) # JPR : ITK vs GDCM (avoid cmake break)
     # Search GDCM2
@@ -249,7 +259,7 @@ IF(USE_GDCM2)
     FIND_PACKAGE(GDCM REQUIRED)
     INCLUDE(${GDCM_USE_FILE})
 
-      IF(NOT ${GDCM_MAJOR_VERSION} EQUAL 2)
+      IF(NOT ${GDCM_MAJOR_VERSION} EQUAL 3)
        MESSAGE(FATAL_ERROR "gdcm version 2 needed. found ${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}. Set GDCM_DIR to the gdcm version 2 directory")
       ENDIF(NOT ${GDCM_MAJOR_VERSION} EQUAL 2)
       
@@ -269,7 +279,7 @@ IF(USE_GDCM2)
                        LINK_DIRECTORIES( ${GDCM_LIBRARY_DIRS}) 
                        
       SET(GDCM2_LIBRARIES
-        ${GDCM_LIBRARIES} 
+        ${GDCM_LIBRARIES}
        )
 
       IF(USE_GDCM_VTK)
@@ -305,7 +315,7 @@ IF(USE_GDCM2)
       ENDIF(USE_GDCM_VTK)
  # ENDIF(NOT USE_ITK) # JPR : ITK vs GDCM (avoid cmake break)
 
-ENDIF(USE_GDCM2)
+ENDIF(USE_GDCM2_UPS_EED)
 
 #-----------------------------------------------------------------------------