]> OCCT Git - occt-wok.git/commitdiff
Adding GDCM support to WOK
authorisk <isk@opencascade.com>
Tue, 17 Feb 2015 12:00:34 +0000 (15:00 +0300)
committerisk <isk@opencascade.com>
Tue, 17 Feb 2015 12:00:34 +0000 (15:00 +0300)
src/WOKBuilderDef/CSF.edl
src/WOKTclLib/osutils.tcl
src/WOKTclLib/templates/custom.sh.in
src/WOKTclLib/templates/env.bat
src/WOKTclLib/templates/env.sh
src/WOKTclLib/templates/template.ac
src/WOKsite/wok_deps.tcl
src/WOKsite/wok_depsgui.tcl
src/WOKsite/wok_env.bat
src/WOKsite/wok_env.sh
src/WOKsite/wok_tclshrc.tcl

index 5bdc31dca9e9c348ab674d12c020e78775d9d704..8c386aab2147621261dd1be94841def72c10074f 100755 (executable)
   @set %CSF_VTK = "";
   @set %CSF_QT_INCLUDES = "";
   @set %CSF_QT = "";
+  @set %CSF_GDCM_INCLUDES = "";
+  @set %CSF_GDCM = "";
 
   @set %CSF_OODBLibs = "";
   @set %CSF_STANDARDDB = "StandardTRAN";
   @set %ENV_HAVE_TBB       = "${HAVE_TBB}";
   @set %ENV_HAVE_OPENCL    = "${HAVE_OPENCL}";
   @set %ENV_HAVE_VTK       = "${HAVE_VTK}";
+  @set %ENV_HAVE_GDCM      = "${HAVE_GDCM}";
   @set %CSF_PRODUCTS_DEFINES = "";
   @if (%ENV_HAVE_FREEIMAGE == "true") then
     @string %CSF_PRODUCTS_DEFINES = %CSF_PRODUCTS_DEFINES " -DHAVE_FREEIMAGE";
       @string %CSF_VTK += "-lvtkRenderingOpenGL-6.1  -lvtkFiltersGeneral-6.1 -lvtkIOCore-6.1 -lvtkIOImage-6.1 -lvtkImagingCore-6.1 -lvtkInteractionStyle-6.1 ";
     @endif;
   @endif;
+  @if (%ENV_HAVE_GDCM == "true") then
+    @string %CSF_PRODUCTS_DEFINES = %CSF_PRODUCTS_DEFINES " -DHAVE_GDCM";
+    @if (%Station != "wnt") then
+      @set %CSF_GDCM = "-lgdcmcharls -lgdcmCommon -lgdcmDICT -lgdcmDSED -lgdcmexpat -lgdcmIOD -lgdcmjpeg8 -lgdcmjpeg12 -lgdcmjpeg16 -lgdcmMSFF -lgdcmopenjpeg -lgdcmzlib ";
+    @endif;
+  @endif;
 
   -- On UNIX systems default configuration file 'config.h'
   -- placed in ${WOKHOME}/lib folder.
index b07296278eae47fa8ac306aa2c9fe21c7a33d0e7..c692684401e83c557f539b96104fc19afe2998be 100755 (executable)
@@ -1885,6 +1885,13 @@ proc osutils:vtkCsf {{theLibSuffix ""}} {
   return [join $aLibArray " "]
 }
 
+# Returns string of library dependencies for generation of Visual Studio project or make lists.
+proc osutils:gdcmCsf {} {
+  set aLibArray [list gdcmcharls gdcmCommon gdcmDICT gdcmDSED gdcmexpat gdcmIOD gdcmjpeg8 gdcmjpeg12 gdcmjpeg16 gdcmMSFF gdcmopenjpeg gdcmzlib]
+
+  return [join $aLibArray " "]
+}
+
 proc osutils:csfList { theOS  theCsfMap theTarget} {
   upvar $theCsfMap aCsfMap
 
@@ -1914,6 +1921,9 @@ proc osutils:csfList { theOS  theCsfMap theTarget} {
     #-- VTK
     set aCsfMap(CSF_VTK)        [osutils:vtkCsf ".lib"]
 
+    #-- GDCM
+    set aCsfMap(CSF_GDCM)       [osutils:gdcmCsf ".lib"]
+
   } else {
 
     #-- Tcl/Tk configuration
@@ -1972,6 +1982,10 @@ proc osutils:csfList { theOS  theCsfMap theTarget} {
     
     #-- VTK
     set aCsfMap(CSF_VTK)            [osutils:vtkCsf]
+
+    #-- GDCM
+    set aCsfMap(CSF_GDCM)           [osutils:gdcmCsf]
+
   }
 }
 
@@ -2258,6 +2272,10 @@ proc osutils:cmktk { theOutDir theToolKit {theIsExec false} theModule} {
       lappend aFileBuff "  if(USE_OPENCL)"
       lappend aFileBuff "    list( APPEND ${theToolKit}_USED_LIBS ${anUsedMacLib} )"
       lappend aFileBuff "  endif()"
+    } elseif { $anUsedMacLib == "GDCM" } {
+      lappend aFileBuff "  if(USE_GDCM)"
+      lappend aFileBuff "    list( APPEND ${theToolKit}_USED_LIBS ${anUsedMacLib} )"
+      lappend aFileBuff "  endif()"
     } elseif { $anUsedMacLib != "" } {
       lappend aFileBuff "  list( APPEND ${theToolKit}_USED_LIBS ${anUsedMacLib} )"
     }
@@ -2302,6 +2320,10 @@ proc osutils:cmktk { theOutDir theToolKit {theIsExec false} theModule} {
       lappend aFileBuff "  if(USE_VTK)"
       lappend aFileBuff "    list( APPEND ${theToolKit}_USED_LIBS ${anUsedUnixLib} )"
       lappend aFileBuff "  endif()"
+    } elseif { $anUsedUnixLib == "GDCM" } {
+      lappend aFileBuff "  if(USE_GDCM)"
+      lappend aFileBuff "    list( APPEND ${theToolKit}_USED_LIBS ${anUsedUnixLib} )"
+      lappend aFileBuff "  endif()"
     } elseif { $anUsedUnixLib != "" } {
       lappend aFileBuff "  list( APPEND ${theToolKit}_USED_LIBS ${anUsedUnixLib} )"
     }
index cead6dbd35a7628cbf690f864d720a9852987c65..c2d2643d31a397563ae78f9f83d505bc8b442357 100644 (file)
@@ -11,6 +11,7 @@ export HAVE_TBB=@HAVE_TBB@
 export HAVE_OPENCL=@HAVE_OPENCL@
 export HAVE_QT=@HAVE_QT@
 export HAVE_VTK=@HAVE_VTK@
+export HAVE_GDCM=@HAVE_GDCM@
 #
 export CSF_OPT_INC="@CSF_OPT_INC@"
 export CSF_OPT_LIB@ARCH@="@CSF_OPT_LIB@"
index ac9bfa73b6cdebd3c15ef299aa1faa4e82f69c49..b0b4a6b161f0e06aa9d930a58a1a0456115081c1 100644 (file)
@@ -24,6 +24,7 @@ set "HAVE_FREEIMAGE=false"
 set "HAVE_GL2PS=false"
 set "HAVE_OPENCL=false"
 set "HAVE_VTK=false"
+set "HAVE_GDCM=false"
 set "CSF_OPT_INC="
 set "CSF_OPT_LIB32="
 set "CSF_OPT_LIB64="
@@ -61,11 +62,13 @@ if ["%HAVE_OPENCL%"]    == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH
 if ["%HAVE_GL2PS%"]     == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GL2PS"
 if ["%HAVE_FREEIMAGE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE"
 if ["%HAVE_VTK%"]       == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_VTK"
+if ["%HAVE_GDCM%"]      == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GDCM"
 if ["%HAVE_TBB%"]       == ["true"] set "CSF_DEFINES=HAVE_TBB;%CSF_DEFINES%"
 if ["%HAVE_OPENCL%"]    == ["true"] set "CSF_DEFINES=HAVE_OPENCL;%CSF_DEFINES%"
 if ["%HAVE_GL2PS%"]     == ["true"] set "CSF_DEFINES=HAVE_GL2PS;%CSF_DEFINES%"
 if ["%HAVE_FREEIMAGE%"] == ["true"] set "CSF_DEFINES=HAVE_FREEIMAGE;%CSF_DEFINES%"
 if ["%HAVE_VTK%"]       == ["true"] set "CSF_DEFINES=HAVE_VTK;%CSF_DEFINES%"
+if ["%HAVE_GDCM%"]      == ["true"] set "CSF_DEFINES=HAVE_GDCM;%CSF_DEFINES%"
 
 rem Eliminate VS warning
 if ["%CSF_DEFINES%"]  == [""] set "CSF_DEFINES=;"
index 472608f84257036553c424505aad7b3210017e46..60f6ce9bf576255ed37e8b7b92e4e73030044e64 100755 (executable)
@@ -19,6 +19,7 @@ export HAVE_OPENCL="false";
 export HAVE_FREEIMAGE="false";
 export HAVE_GL2PS="false";
 export HAVE_VTK="false";
+export HAVE_GDCM="false";
 export MACOSX_USE_GLX="false";
 export CSF_OPT_INC=""
 export CSF_OPT_LIB32=""
@@ -96,6 +97,9 @@ fi
 if [ "$HAVE_VTK" == "true" ]; then
   export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"
 fi
+if [ "$HAVE_GDCM" == "true" ]; then
+  export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GDCM"
+fi
 # Option to compile OCCT with X11 libs on Mac OS X
 if [ "$MACOSX_USE_GLX" == "true" ]; then
   export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DMACOSX_USE_GLX"
index 4602aa406454a2d4b40eb30092145c434add75d2..93ce7af84be73f9fb516bac71bad9d2c89b0cedc 100644 (file)
@@ -800,6 +800,39 @@ else
   fi
 fi
 
+#---------------------------------------------------------------------
+#
+# Check for GDCM Includes
+#
+#
+#---------------------------------------------------------------------
+AC_ARG_WITH([gdcm-include],
+  [AC_HELP_STRING([--with-gdcm-include=DIR], [Location of GDCM includes])],
+  [gdcm_inc="${withval}"],[gdcm_inc=])
+
+if test "xno$gdcm_inc" = "xno"; then
+  # user --without-gdcm-lib
+  HAVE_GDCM_INC=no
+  DISABLE_GDCM_REASON="(--with-gdcm-include=DIR option was not defined)"
+else
+  CSF_GDCM_INCLUDES=""
+  AC_LANG([C++])
+  HAVE_GDCM_INC=yes
+  if test ! -d $gdcm_inc; then
+    DISABLE_GDCM_REASON="($gdcm_inc directory does not exists)"
+    AC_MSG_ERROR([$gdcm_inc directory does not exists])
+  elif test ! -f $gdcm_inc/gdcmImageReader.h; then
+    DISABLE_GDCM_REASON="(gdcm headers are not found in $gdcm_inc)"
+    AC_MSG_ERROR([gdcm headers are not found in $gdcm_inc])
+  elif test "x$gdcm_inc" != "x"; then
+     CPPFLAGS="-I$gdcm_inc $CPPFLAGS";
+  else
+     HAVE_GDCM_INC=no
+     DISABLE_GDCM_REASON="(--with-gdcm-include=DIR option was not defined)"
+     AC_MSG_NOTICE("--with-gdcm-include=DIR option was not defined")
+  fi
+fi
+
 #---------------------------------------------------------------------
 #
 # Check for TBB Libraries
@@ -1056,6 +1089,54 @@ fi
 #CSF_VTK="$CSF_VTK_LIB"
 AM_CONDITIONAL( HAVE_VTK, [test "xyes" = "x$HAVE_VTK"] )
 
+#---------------------------------------------------------------------
+#
+# Check for GDCM Libraries
+#
+#
+#---------------------------------------------------------------------
+AC_ARG_WITH([gdcm-library],
+  [AC_HELP_STRING([--with-gdcm-library=DIR],[Location of GDCM libraries])],
+  [gdcm_lib="${withval}"],[gdcm_lib=])
+
+if test "xno" = "xno$gdcm_lib"; then
+# user specified --without-gdcm
+  HAVE_GDCM=no
+  if test "x$DISABLE_GDCM_REASON" = "x" ; then
+    DISABLE_GDCM_REASON="(--with-gdcm-library=DIR option was not defined)"
+  fi
+else
+  CSF_GDCM_LIB=""
+  HAVE_GDCM=yes
+
+  #CPP_FLAGS="-I$gdcm $CPPFLAGS"
+  #AC_CHECK_HEADER( [gdcmImageReader.h], [HAVE_GDCM_INC=yes], [HAVE_GDCM_INC=no] )
+  if test "x$HAVE_GDCM_INC" = "xyes"; then
+    if test ! -d $gdcm_lib; then
+      DISABLE_GDCM_REASON="($gdcm_lib directory does not exist)"
+      AC_MSG_ERROR([$gdcm_lib directory does not exist])
+    elif test ! -f $gdcm_lib/libgdcmCommon.so; then
+      DISABLE_GDCM_REASON="(gdcm libraries are not found in $gdcm_lib)"
+      AC_MSG_ERROR([gdcm libraries are not found in $gdcm_lib])
+    elif test "x$gdcm_lib" != "x" -a "x$gdcm_inc" != "x"; then
+      CSF_GDCM_LIB="-L$gdcm_lib -lgdcmcharls -lgdcmCommon -lgdcmDICT -lgdcmDSED -lgdcmexpat -lgdcmIOD -lgdcmjpeg8 -lgdcmjpeg12 -lgdcmjpeg16 -lgdcmMSFF -lgdcmopenjpeg -lgdcmzlib "
+      CSF_OPT_INC="$gdcm_inc:${CSF_OPT_INC}"
+      CSF_OPT_LIB="$gdcm_lib:${CSF_OPT_LIB}"
+      CSF_OPT_INCLUDES="${CSF_OPT_INCLUDES} -I$gdcm_inc -DHAVE_GDCM"
+    else
+      HAVE_GDCM=no
+      AC_MSG_NOTICE("--with-gdcm-library=DIR option was not defined")
+      DISABLE_GDCM_REASON="(--with-gdcm-library=DIR option was not defined)"
+    fi
+  else
+    HAVE_GDCM=no
+  fi
+fi
+
+#CSF_GDCM="$CSF_GDCM_LIB"
+AM_CONDITIONAL( HAVE_GDCM, [test "xyes" = "x$HAVE_GDCM"] )
+
+
 #----------------------------------------------------------------------
 #
 # Enalbe/Disable Modules
index 1d6394457f3bdec0e7f9e2ae4fd2ebf7897a3766..01c788e9b3e1fb4e8afe6793431180931f31b9bb 100644 (file)
@@ -28,6 +28,7 @@ set HAVE_GL2PS     "false"
 set HAVE_TBB       "false"
 set HAVE_OPENCL    "false"
 set HAVE_VTK       "false"
+set HAVE_GDCM      "false"
 set MACOSX_USE_GLX "false"
 set CHECK_QT4      "true"
 set CHECK_JDK      "true"
@@ -62,6 +63,9 @@ if { [info exists ::env(HAVE_OPENCL)] } {
 if { [info exists ::env(HAVE_VTK)] } {
   set HAVE_VTK "$::env(HAVE_VTK)"
 }
+if { [info exists ::env(HAVE_GDCM)] } {
+  set HAVE_GDCM "$::env(HAVE_GDCM)"
+}
 if { [info exists ::env(MACOSX_USE_GLX)] } {
   set MACOSX_USE_GLX "$::env(MACOSX_USE_GLX)"
 }
@@ -749,6 +753,97 @@ proc wokdep:SearchVTK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
   return "$isFound"
 }
 
+# Auxiliary function, gets GDCM version to set default search directory
+proc wokdep:GDCMVersion { thePath } {
+  set aResult "2.4"
+
+  set aRoot [lindex [regexp -all -inline {[0-9.]*} [file tail $thePath]] 0]
+  if { "$aRoot" != "" } {
+    set aRoot [regexp -inline {[0-9]*.[0-9]*} $aRoot]
+    if { "$aRoot" != "" } {
+    set aResult $aRoot
+    }
+  }
+
+  return $aResult
+}
+
+# Search GDCM library placement
+proc wokdep:SearchGDCM {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
+  upvar $theErrInc   anErrInc
+  upvar $theErrLib32 anErrLib32
+  upvar $theErrLib64 anErrLib64
+  upvar $theErrBin32 anErrBin32
+  upvar $theErrBin64 anErrBin64
+
+  set isFound "true"
+
+  set aGdcmPath ""
+  set aGdcmIncPath [wokdep:SearchHeader "gdcmConfigure.h"]
+  set aGdcmVer [wokdep:GDCMVersion $aGdcmIncPath]
+  if { "$aGdcmIncPath" == ""} {
+    set aPathList [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{GDCM}*]
+    set aGdcmPath [wokdep:Preferred "$aPathList" "$::VCVER" "$::ARCH" ]
+    if { "$aGdcmPath" != "" && [file exists "$aGdcmPath/include/gdcm-[wokdep:GDCMVersion $aGdcmPath]/gdcmConfigure.h"]} {
+      set aGdcmVer [wokdep:GDCMVersion $aGdcmPath]
+      lappend ::CSF_OPT_INC "$aGdcmPath/include/gdcm-[wokdep:GDCMVersion $aGdcmPath]"
+    } else { # try to search in all found paths
+      set isFound "false"
+      foreach anIt $aPathList {
+        if { [file exists "$anIt/include/gdcm-[wokdep:GDCMVersion $anIt]/gdcmConfigure.h"] } {
+          set aGdcmPath $anIt
+          set aGdcmVer [wokdep:GDCMVersion $aGdcmPath]
+          lappend ::CSF_OPT_INC "$anIt/include/gdcm-[wokdep:GDCMVersion $anIt]"
+          set isFound "true"
+          break
+        }
+      }
+
+      # Bad case: we do not found vtkConfigure.h in all paths.
+      if { "$isFound" == "false"} {
+        lappend anErrInc "Error: 'gdcmConfigure.h' not found (GDCM)"
+        set isFound "false"
+      }
+    }
+  }
+
+  set aGdcmLibPath ""
+  foreach anArchIter {64 32} {
+    set aGdcmLibPath [wokdep:SearchLib "gdcmCommon" "$anArchIter"]
+    if { "$aGdcmLibPath" == "" } {
+      set aPathList [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{GDCM}*]
+      set aPath [wokdep:Preferred $aPathList "$::VCVER" "$anArchIter" ]
+      set aGdcmLibPath [wokdep:SearchLib "gdcmCommon" "$anArchIter" "$aPath/lib/gdcm-$aGdcmVer"]
+      if { "$aGdcmLibPath" != "" } {
+        lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib/gdcm-$aGdcmVer"
+      } else {
+        set aPath [wokdep:SearchLib "gdcmCommon" "$anArchIter" "$aGdcmPath/lib/gdcm-$aGdcmVer"]
+        if { "$aPath" != "" } {
+          set aLibPath $aGdcmIncPath
+          lappend ::CSF_OPT_LIB$anArchIter "$aLibPath/lib/gdcm-$aGdcmVer"
+        } else {
+          # The last chance: search /lib directory in all found paths
+          foreach anIt $aPathList {
+            set aGdcmLibPath [wokdep:SearchLib "gdcmCommon" "$anArchIter" "$anIt/lib/gdcm-$aGdcmVer"]
+            if { "$aGdcmLibPath" != ""} {
+              lappend ::CSF_OPT_LIB$anArchIter "$anIt/lib/gdcm-$aGdcmVer"
+              break
+            }
+          }
+          if { "$aGdcmLibPath" == "" } {
+            lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}gdcmCommon\.${::SYS_LIB_SUFFIX}' not found (GDCM)"
+            if { "$::ARCH" == "$anArchIter" } {
+              set isFound "false"
+            }
+          }
+        }
+      }
+    }
+  }
+
+  return "$isFound"
+}
+
 # Search Qt4 libraries placement
 proc wokdep:SearchQt4 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
   upvar $theErrInc   anErrInc
@@ -915,6 +1010,7 @@ proc wokdep:SaveCustom {} {
     puts $aFile "set HAVE_TBB=$::HAVE_TBB"
     puts $aFile "set HAVE_OPENCL=$::HAVE_OPENCL"
     puts $aFile "set HAVE_VTK=$::HAVE_VTK"
+    puts $aFile "set HAVE_GDCM=$::HAVE_GDCM"
     puts $aFile "set CHECK_QT4=$::CHECK_QT4"
     puts $aFile "set CHECK_JDK=$::CHECK_JDK"
 
@@ -963,6 +1059,7 @@ proc wokdep:SaveCustom {} {
     puts $aFile "export HAVE_TBB=$::HAVE_TBB"
     puts $aFile "export HAVE_OPENCL=$::HAVE_OPENCL"
     puts $aFile "export HAVE_VTK=$::HAVE_VTK"
+    puts $aFile "export HAVE_GDCM=$::HAVE_GDCM"
     if { "$::tcl_platform(os)" == "Darwin" } {
       puts $aFile "export MACOSX_USE_GLX=$::MACOSX_USE_GLX"
     }
index 476fdace8ff21a2e620e4632f25205620762e429..9f49ae307df990f60afa7efa25c2120af0f233c0 100644 (file)
@@ -108,6 +108,9 @@ proc wokdep:gui:UpdateList {} {
   if { "$::HAVE_VTK" == "true" } {
     wokdep:SearchVTK  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
   }
+  if { "$::HAVE_GDCM" == "true" } {
+    wokdep:SearchGDCM  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
+  }
   if { "$::CHECK_QT4" == "true" } {
     wokdep:SearchQt4     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
   }
@@ -356,6 +359,8 @@ checkbutton   .myFrame.myQt4Check      -offvalue "false" -onvalue "true" -variab
 ttk::label    .myFrame.myQt4Lbl        -text "Search Qt4"
 checkbutton   .myFrame.myJDKCheck      -offvalue "false" -onvalue "true" -variable CHECK_JDK      -command wokdep:gui:UpdateList
 ttk::label    .myFrame.myJDKLbl        -text "Search JDK"
+ttk::label    .myFrame.myGDCMLbl       -text "Use GDCM"
+checkbutton   .myFrame.myGDCMCheck     -offvalue "false" -onvalue "true" -variable HAVE_GDCM      -command wokdep:gui:UpdateList
 
 # Additional headers search paths
 ttk::label    .myFrame.myIncLbl    -text "Additional headers search paths" -relief solid -padding {5 5 80 5}
@@ -443,6 +448,8 @@ grid .myFrame.myJDKLbl        -row $aRowIter -column 3 -sticky w
 incr aRowIter
 grid .myFrame.myTbbCheck      -row $aRowIter -column 0 -sticky e
 grid .myFrame.myTbbLbl        -row $aRowIter -column 1 -sticky w
+grid .myFrame.myGDCMCheck     -row $aRowIter -column 2 -sticky e
+grid .myFrame.myGDCMLbl       -row $aRowIter -column 3 -sticky w
 incr aRowIter
 grid .myFrame.myOpenClCheck   -row $aRowIter -column 0 -sticky e
 grid .myFrame.myOpenClLbl     -row $aRowIter -column 1 -sticky w
index 84beac70c9864d14315a5b27f0bebe06fd00390d..0c84b782ae2fa6ad3922f451f68c15f2338e4598 100644 (file)
@@ -19,6 +19,7 @@ set "HAVE_OPENCL=false"
 set "HAVE_FREEIMAGE=false"
 set "HAVE_GL2PS=false"
 set "HAVE_VTK=false"
+set "HAVE_GDCM=false"
 set "VCVARS="
 
 rem ----- Set local settings (M$ Visual Studio compilers etc.) -----
@@ -32,6 +33,7 @@ if ["%HAVE_OPENCL%"]    == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH
 if ["%HAVE_GL2PS%"]     == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GL2PS"
 if ["%HAVE_FREEIMAGE%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_FREEIMAGE"
 if ["%HAVE_VTK%"]       == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_VTK"
+if ["%HAVE_GDCM%"]      == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_GDCM"
 
 rem ----- Setup Environment Variables for M$ Visual Studio compilers -----
 if ["%ARCH%"] == ["32"] set VCARCH=x86
index 2bb6468bcc176f5c9b5830c17c923c610acc9a9f..d53909a89c89ffa429f90852afa54d530052edbf 100644 (file)
@@ -26,6 +26,7 @@ export HAVE_OPENCL="false";
 export HAVE_FREEIMAGE="false";
 export HAVE_GL2PS="false";
 export HAVE_VTK="false";
+export HAVE_GDCM="false";
 export PRODUCTS_DEFINES="";
 
 # ----- Set local settings -----
@@ -48,6 +49,9 @@ fi
 if [ "$HAVE_VTK" == "true" ]; then
   export PRODUCTS_DEFINES="$PRODUCTS_DEFINES -DHAVE_VTK";
 fi
+if [ "$HAVE_GDCM" == "true" ]; then
+  export PRODUCTS_DEFINES="$PRODUCTS_DEFINES -DHAVE_GDCM";
+fi
 # ----- Setup Environment Variables -----
 anArch=`uname -m`
 if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
index 4ef676af96b0705337f37f7b2bb10605984bc1f2..27e24af8b27a10e016f5174486dc476fec3c2f8e 100644 (file)
@@ -179,6 +179,11 @@ if { "$::HAVE_VTK" == "true" } {
     puts "  not found: VTK (Optional, enabled)"
   }
 }
+if { "$::HAVE_GDCM" == "true" } {
+  if { [wokdep:SearchGDCM anErrs anErrs anErrs anErrs anErrs] == "false"} {
+    puts "  not found: GDCM (Optional, enabled)"
+  }
+}
 if { "$::CHECK_QT4" == "true" } {
   if { [wokdep:SearchQt4 anErrs anErrs anErrs anErrs anErrs] == "false" } {
     puts "  not found: Qt4 (Optional, set to check)"