]> OCCT Git - occt-wok.git/commitdiff
0024993: Adding VTK support to WOK
authoraba <aba@opencascade.com>
Thu, 11 Sep 2014 09:27:44 +0000 (13:27 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 11 Sep 2014 09:28:59 +0000 (13:28 +0400)
VtkVersion() function was moved to wokdep namespace.

Porting on VTK 6.1

Corrected proper paths generation, remarks

Corrected path duplication

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 c1bef3c06439de0b600400674a34914632ac0dc4..5bdc31dca9e9c348ab674d12c020e78775d9d704 100755 (executable)
   @set %CSF_TBB = "";
   @set %CSF_OPENCL_INCLUDES = "";
   @set %CSF_OPENCL = "";
-
+  @set %CSF_VTK_INCLUDES = "";
+  @set %CSF_VTK = "";
   @set %CSF_QT_INCLUDES = "";
   @set %CSF_QT = "";
 
   @set %ENV_HAVE_GL2PS     = "${HAVE_GL2PS}";
   @set %ENV_HAVE_TBB       = "${HAVE_TBB}";
   @set %ENV_HAVE_OPENCL    = "${HAVE_OPENCL}";
+  @set %ENV_HAVE_VTK       = "${HAVE_VTK}";
   @set %CSF_PRODUCTS_DEFINES = "";
   @if (%ENV_HAVE_FREEIMAGE == "true") then
     @string %CSF_PRODUCTS_DEFINES = %CSF_PRODUCTS_DEFINES " -DHAVE_FREEIMAGE";
       @endif;
     @endif;
   @endif;
+  @if (%ENV_HAVE_VTK == "true") then
+    @string %CSF_PRODUCTS_DEFINES = %CSF_PRODUCTS_DEFINES " -DHAVE_VTK";
+    @if (%Station != "wnt") then
+      @set %CSF_VTK = "-lvtkCommonCore-6.1 -lvtkCommonDataModel-6.1 -lvtkCommonExecutionModel-6.1 -lvtkCommonMath-6.1 -lvtkCommonTransforms-6.1 -lvtkRenderingCore-6.1 ";
+      @string %CSF_VTK += "-lvtkRenderingOpenGL-6.1  -lvtkFiltersGeneral-6.1 -lvtkIOCore-6.1 -lvtkIOImage-6.1 -lvtkImagingCore-6.1 -lvtkInteractionStyle-6.1 ";
+    @endif;
+  @endif;
 
   -- On UNIX systems default configuration file 'config.h'
   -- placed in ${WOKHOME}/lib folder.
index 5e500fb657b65da4a989c794650c58e9af217e5f..cf19966e1bd1027cec29438180d5d11f2c5eab42 100755 (executable)
@@ -1829,6 +1829,29 @@ proc osutils:commonUsedTK { theToolKit } {
   return $anUsedToolKits
 }
 
+# Load 3rd-party script to find preferred path for VTK version determination 
+global tcl_platform
+source "$::env(WOKHOME)/site/wok_deps.tcl"
+
+# Returns string of library dependencies for generation of Visual Studio project or make lists.
+# Parameter theLibSuffix determines if names of libraries are to include extensions in the end (i.e. *.lib)
+proc osutils:vtkCsf {{theLibSuffix ""}} {
+  set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*] "$::VCVER" "$::ARCH" ]
+  set aVtkVer [wokdep:VtkVersion $aPath]
+
+  set aLibArray [list vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonTransforms vtkRenderingCore \
+                      vtkRenderingOpenGL  vtkFiltersGeneral vtkIOCore vtkIOImage vtkImagingCore vtkInteractionStyle]
+                      
+  # Additional suffices for the libraries
+  set anIdx 0
+  foreach anItem $aLibArray {
+    lset aLibArray $anIdx $anItem-$aVtkVer$theLibSuffix
+    incr anIdx
+  }
+
+  return [join $aLibArray " "]
+}
+
 proc osutils:csfList { theOS  theCsfMap } {
   upvar $theCsfMap aCsfMap
 
@@ -1853,6 +1876,9 @@ proc osutils:csfList { theOS  theCsfMap } {
 #    set aCsfMap(CSF_TclTkLibs)  "tk86.lib"
     set aCsfMap(CSF_QT)         "QtCore4.lib QtGui4.lib"
 
+    #-- VTK
+    set aCsfMap(CSF_VTK)        [osutils:vtkCsf ".lib"]
+
   } else {
 
     #-- Tcl/Tk configuration
@@ -1896,6 +1922,9 @@ proc osutils:csfList { theOS  theCsfMap } {
 
     #-- OpenCL
     set aCsfMap(CSF_OPENCL)         "OpenCL"
+    
+    #-- VTK
+    set aCsfMap(CSF_VTK)            [osutils:vtkCsf]
   }
 }
 
index 91cd4a77f0d307604e727451ea746b88b82bf5b1..cead6dbd35a7628cbf690f864d720a9852987c65 100644 (file)
@@ -10,6 +10,7 @@ export HAVE_GL2PS=@HAVE_GL2PS@
 export HAVE_TBB=@HAVE_TBB@
 export HAVE_OPENCL=@HAVE_OPENCL@
 export HAVE_QT=@HAVE_QT@
+export HAVE_VTK=@HAVE_VTK@
 #
 export CSF_OPT_INC="@CSF_OPT_INC@"
 export CSF_OPT_LIB@ARCH@="@CSF_OPT_LIB@"
index f069d51eab030f0571adc51d73417ce1ecfacafc..ac9bfa73b6cdebd3c15ef299aa1faa4e82f69c49 100644 (file)
@@ -23,6 +23,7 @@ set "HAVE_OPENCL=false"
 set "HAVE_FREEIMAGE=false"
 set "HAVE_GL2PS=false"
 set "HAVE_OPENCL=false"
+set "HAVE_VTK=false"
 set "CSF_OPT_INC="
 set "CSF_OPT_LIB32="
 set "CSF_OPT_LIB64="
@@ -59,10 +60,12 @@ if ["%HAVE_TBB%"]       == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH
 if ["%HAVE_OPENCL%"]    == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENCL"
 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_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%"
 
 rem Eliminate VS warning
 if ["%CSF_DEFINES%"]  == [""] set "CSF_DEFINES=;"
index 6929a05367603c0cbafa1eb83850821310a3c318..472608f84257036553c424505aad7b3210017e46 100755 (executable)
@@ -18,6 +18,7 @@ export HAVE_TBB="false";
 export HAVE_OPENCL="false";
 export HAVE_FREEIMAGE="false";
 export HAVE_GL2PS="false";
+export HAVE_VTK="false";
 export MACOSX_USE_GLX="false";
 export CSF_OPT_INC=""
 export CSF_OPT_LIB32=""
@@ -92,7 +93,9 @@ fi
 if [ "$HAVE_GL2PS" == "true" ]; then
   export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_GL2PS"
 fi
-
+if [ "$HAVE_VTK" == "true" ]; then
+  export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_VTK"
+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 f3b6a11b0025296fd9ec7bcded114312006b1dee..9ac77a97836e796791fffaa20a85c95408028f9d 100644 (file)
@@ -334,7 +334,7 @@ else
   #       default compiler search path and any paths the user specified
   #       via CPPFLAGS on the command line.
   AC_CHECK_HEADER( [jni.h], [HAVE_JAVA=yes], [HAVE_JAVA=no
-    AC_MSG_NOTICE("Specify --with-java-include=<DIR> to enalbe Java support")] )
+    AC_MSG_NOTICE("Specify --with-java-include=<DIR> to enable Java support")] )
   if test "xyes" = "x$HAVE_JAVA"; then
     AC_MSG_CHECKING([java JNI version >= 1.2])
     AC_TRY_COMPILE( [#include <jni.h>],
@@ -767,6 +767,35 @@ else
   fi
 fi
 
+#---------------------------------------------------------------------
+#
+# Check for VTK Includes
+#  
+#  
+#---------------------------------------------------------------------
+AC_ARG_WITH([vtk-include],
+  [AC_HELP_STRING([--with-vtk-include=DIR],[Location of VTK includes])],
+  [vtk_inc="${withval}"],[vtk_inc=])
+
+if test "xno$vtk_inc" = "xno"; then
+  # user specified --without-vtk-lib
+  HAVE_VTK=no
+  HAVE_VTK_INC=no
+  DISABLE_VTK_REASON_INC="(--with-vtk-include=DIR option was not defined)"
+else
+  CSF_VTK_INCLUDES=""
+  AC_LANG([C++])
+  HAVE_VTK_INC=yes
+  if test ! -d $vtk_inc; then
+    DISABLE_VTK_REASON_INC="($vtk_inc directory is not exists)"
+    AC_MSG_ERROR([$vtk_inc directory is not exists])
+  elif test "x$vtk_inc" != "x"; then
+     CPPFLAGS="-I$vtk_inc $CPPFLAGS";
+  else
+     AC_MSG_NOTICE("--with-vtk-include key is not defined")
+  fi
+fi
+
 #---------------------------------------------------------------------
 #
 # Check for TBB Libraries
@@ -975,6 +1004,66 @@ else
   CPPFLAGS="$CPPFLAGS -DNDEBUG  -DNo_Exception"
 fi
 
+#---------------------------------------------------------------------
+#
+# Check for VTK Libraries
+#  
+#  
+#---------------------------------------------------------------------
+AC_ARG_WITH([vtk-library],
+  [AC_HELP_STRING([--with-vtk-library=DIR],[Location of VTK libraries])],
+  [vtk_lib="${withval}"],[vtk_lib=])
+
+if test "xno" = "xno$vtk_lib"; then
+# user specified --without-vtk
+  HAVE_VTK=no
+  DISABLE_VTK_REASON_LIB="(--with-vtk-library=DIR option was not defined)"
+else
+  CSF_VTK_LIB=""
+  HAVE_VTK=yes
+
+  #CPP_FLAGS="-I$vtk $CPPFLAGS"
+  #AC_CHECK_HEADER( [Vtk/vtkConfigure.h], [HAVE_VTK_INC=yes], [HAVE_VTK_INC=no] )
+  if test "x$HAVE_VTK_INC" = "xyes"; then
+    if test ! -d $vtk; then
+      DISABLE_VTK_REASON_LIB="($vtk_lib directory does not exist)"
+      AC_MSG_ERROR([$vtk_lib directory does not exist])
+    elif test "x$vtk_lib" != "x"; then
+      LDFLAGS="-L$vtk_lib $LDFLAGS"
+    fi
+  else
+    HAVE_VTK=no
+  fi
+  
+  if test "x$HAVE_VTK" = "xyes"; then
+    if test "x$vtk_inc" != "x"; then
+      CSF_VTK_INCLUDES=""
+      CSF_OPT_INCLUDES="${CSF_OPT_INCLUDES} -I$vtk_inc -DHAVE_VTK"
+    else
+      HAVE_VTK=no
+    fi
+    if test "x$vtk_lib" != "x"; then
+      CSF_VTK_LIB="-L$vtk_lib -lvtkCommonCore-6.1 -lvtkCommonDataModel-6.1 -lvtkCommonExecutionModel-6.1 -lvtkCommonMath-6.1 -lvtkCommonTransforms-6.1 "
+      CSF_VTK_LIB="${CSF_VTK_LIB} -lvtkRenderingCore-6.1 -lvtkRenderingOpenGL-6.1  -lvtkFiltersGeneral-6.1 -lvtkIOCore-6.1 -lvtkIOImage-6.1 -lvtkImagingCore-6.1 -lvtkInteractionStyle-6.1 "
+    else
+      HAVE_VTK=no
+    fi
+
+    if test "x$HAVE_VTK" = "xyes"; then
+      CSF_OPT_INC="$vtk_inc:${CSF_OPT_INC}"
+      CSF_OPT_LIB="$vtk_lib:${CSF_OPT_LIB}"
+    else
+      DISABLE_VTK_REASON="(VTK was not found)"
+    fi
+  else
+    AC_MSG_NOTICE("Specify --with-vtk-library to enable VTK support")
+    DISABLE_VTK_REASON_LIB="(VTK libraries were not found)"
+  fi
+fi
+
+CSF_VTK="$CSF_VTK_LIB"
+AM_CONDITIONAL( HAVE_VTK, [test "xyes" = "x$HAVE_VTK"] )
+
 #----------------------------------------------------------------------
 #
 # Enalbe/Disable Modules
@@ -1049,6 +1138,9 @@ AC_SUBST(CSF_OPENCL_LIB)
 AC_SUBST(HAVE_QT)
 AC_SUBST(CSF_QT_INCLUDES)
 AC_SUBST(CSF_QT_LIB)
+AC_SUBST(HAVE_VTK)
+AC_SUBST(CSF_VTK_INCLUDES)
+AC_SUBST(CSF_VTK_LIB)
 
 AC_SUBST(CSF_OPT_INC)
 AC_SUBST(CSF_OPT_LIB)
@@ -1075,6 +1167,7 @@ echo "tbb includes  : $HAVE_TBB_INC $DISABLE_TBB_REASON_INC"
 echo "tbb libraries : $HAVE_TBB $DISABLE_TBB_REASON_LIB"
 echo "opencl        : $HAVE_OPENCL $DISABLE_OPENCL_REASON"
 echo "qt            : $HAVE_QT $DISABLE_QT_REASON"
+echo "vtk           : $HAVE_VTK $DISABLE_VTK_REASON"
 echo
 echo "Component                   Build"
 echo "--------------------------  -----"
index 709738ff102679b805a157a0ee962bfd0daa1ae4..1d6394457f3bdec0e7f9e2ae4fd2ebf7897a3766 100644 (file)
@@ -27,6 +27,7 @@ set HAVE_FREEIMAGE "false"
 set HAVE_GL2PS     "false"
 set HAVE_TBB       "false"
 set HAVE_OPENCL    "false"
+set HAVE_VTK       "false"
 set MACOSX_USE_GLX "false"
 set CHECK_QT4      "true"
 set CHECK_JDK      "true"
@@ -58,6 +59,9 @@ if { [info exists ::env(HAVE_TBB)] } {
 if { [info exists ::env(HAVE_OPENCL)] } {
   set HAVE_OPENCL "$::env(HAVE_OPENCL)"
 }
+if { [info exists ::env(HAVE_VTK)] } {
+  set HAVE_VTK "$::env(HAVE_VTK)"
+}
 if { [info exists ::env(MACOSX_USE_GLX)] } {
   set MACOSX_USE_GLX "$::env(MACOSX_USE_GLX)"
 }
@@ -625,6 +629,126 @@ proc wokdep:SearchOpenCL {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBi
   return "$isFound"
 }
 
+# Auxiliary function, gets VTK version to set default search directory
+proc wokdep:VtkVersion { thePath } {
+  set aResult "6.1"
+
+  set aVtkRoot [lindex [regexp -all -inline {[0-9.]*} [file tail $thePath]] 0]
+  if { "$aVtkRoot" != "" } {
+    set aVtkRoot [regexp -inline {[0-9]*.[0-9]*} $aVtkRoot]
+    if { "$aVtkRoot" != "" } {
+    set aResult $aVtkRoot
+    }
+  }
+
+  return $aResult
+}
+
+# Search VTK library placement
+proc wokdep:SearchVTK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
+  upvar $theErrInc   anErrInc
+  upvar $theErrLib32 anErrLib32
+  upvar $theErrLib64 anErrLib64
+  upvar $theErrBin32 anErrBin32
+  upvar $theErrBin64 anErrBin64
+
+  set isFound "true"
+  
+  set aVtkPath ""
+  set aVtkIncPath [wokdep:SearchHeader "vtkConfigure.h"]
+  set aVtkVer [wokdep:VtkVersion $aVtkIncPath]
+  if { "$aVtkIncPath" == ""} {
+    set aPathList [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*]
+    set aVtkPath [wokdep:Preferred "$aPathList" "$::VCVER" "$::ARCH" ]
+    if { "$aVtkPath" != "" && [file exists "$aVtkPath/include/vtk-[wokdep:VtkVersion $aVtkPath]/vtkConfigure.h"]} { 
+      set aVtkVer [wokdep:VtkVersion $aVtkPath]
+      lappend ::CSF_OPT_INC "$aVtkPath/include/vtk-[wokdep:VtkVersion $aVtkPath]"
+    } else { # try to search in all found paths
+      set isFound "false"
+      foreach anIt $aPathList {
+        if { [file exists "$anIt/include/vtk-[wokdep:VtkVersion $anIt]/vtkConfigure.h"] } {
+          set aVtkPath $anIt
+          set aVtkVer [wokdep:VtkVersion $aVtkPath]
+          lappend ::CSF_OPT_INC "$anIt/include/vtk-[wokdep:VtkVersion $anIt]"
+          set isFound "true"
+          break
+        }
+      }
+
+      # Bad case: we do not found vtkConfigure.h in all paths.
+      if { "$isFound" == "false"} {
+        lappend anErrInc "Error: 'vtkConfigure.h' not found (VTK)"
+        set isFound "false"
+      }
+    }
+  }
+
+  set aVtkLibPath ""
+  foreach anArchIter {64 32} {
+    set aVtkLibPath [wokdep:SearchLib "vtkCommonCore-$aVtkVer" "$anArchIter"]
+    if { "$aVtkLibPath" == "" } {
+      set aPathList [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*]
+      set aPath [wokdep:Preferred $aPathList "$::VCVER" "$anArchIter" ]
+      set aVtkLibPath [wokdep:SearchLib "vtkCommonCore-$aVtkVer" "$anArchIter" "$aPath/lib"]
+      if { "$aVtkLibPath" != "" } {
+        lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib"
+      } else {
+        set aPath [wokdep:SearchLib "vtkCommonCore-$aVtkVer" "$anArchIter" "$aVtkPath/lib"]
+        if { "$aPath" != "" } {
+          set aLibPath $aVtkIncPath
+          lappend ::CSF_OPT_LIB$anArchIter "$aLibPath/lib"
+        } else {
+          # The last chance: search /lib directory in all found paths
+          foreach anIt $aPathList {
+            set aVtkLibPath [wokdep:SearchLib "vtkCommonCore-$aVtkVer" "$anArchIter" "$anIt/lib"]
+            if { "$aVtkLibPath" != ""} {
+              lappend ::CSF_OPT_LIB$anArchIter "$anIt/lib"
+              break
+            }
+          }
+          if { "$aVtkLibPath" == "" } {
+            lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}vtkCommonCore-${aVtkVer}\.${::SYS_LIB_SUFFIX}' not found (VTK)"
+            if { "$::ARCH" == "$anArchIter" } {
+              set isFound "false"
+            }
+          }
+        }
+      }
+    }
+  }
+  
+    # Search binary path
+    if { "$::tcl_platform(platform)" == "windows" } {
+      foreach anArchIter {64 32} {
+        set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter"]
+        if { "$aVtkBinPath" == "" } {
+          set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*] "$::VCVER" "$anArchIter" ]
+          set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aPath/bin"]
+          if { "$aVtkBinPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin"
+          } else {
+            set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aPath/lib"]
+            if { "$aVtkBinPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib" } 
+          }
+        }
+      }
+      
+      # We didn't find preferred binary path => search through inc path or among all available VTK directories
+      if { "$aVtkBinPath" == "" } {
+        # Try to find in lib path
+        set aPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aLibPath/bin"]
+        if { "$aPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aLibPath/bin"
+        } elseif { [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aLibPath/lib"] != "" } {
+          lappend ::CSF_OPT_BIN$anArchIter "$aLibPath/lib"
+        } else {
+           lappend anErrBin$anArchIter "Error: 'vtkCommonCore-${aVtkVer}.dll' not found (VTK)"
+           set isFound "false"
+        }
+      }
+    }
+
+  return "$isFound"
+}
+
 # Search Qt4 libraries placement
 proc wokdep:SearchQt4 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} {
   upvar $theErrInc   anErrInc
@@ -790,6 +914,7 @@ proc wokdep:SaveCustom {} {
     puts $aFile "set HAVE_GL2PS=$::HAVE_GL2PS"
     puts $aFile "set HAVE_TBB=$::HAVE_TBB"
     puts $aFile "set HAVE_OPENCL=$::HAVE_OPENCL"
+    puts $aFile "set HAVE_VTK=$::HAVE_VTK"
     puts $aFile "set CHECK_QT4=$::CHECK_QT4"
     puts $aFile "set CHECK_JDK=$::CHECK_JDK"
 
@@ -837,6 +962,7 @@ proc wokdep:SaveCustom {} {
     puts $aFile "export HAVE_GL2PS=$::HAVE_GL2PS"
     puts $aFile "export HAVE_TBB=$::HAVE_TBB"
     puts $aFile "export HAVE_OPENCL=$::HAVE_OPENCL"
+    puts $aFile "export HAVE_VTK=$::HAVE_VTK"
     if { "$::tcl_platform(os)" == "Darwin" } {
       puts $aFile "export MACOSX_USE_GLX=$::MACOSX_USE_GLX"
     }
index 8338d3df2784b795575468559db250c606b04aab..476fdace8ff21a2e620e4632f25205620762e429 100644 (file)
@@ -105,6 +105,9 @@ proc wokdep:gui:UpdateList {} {
   if { "$::HAVE_OPENCL" == "true" } {
     wokdep:SearchOpenCL  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
   }
+  if { "$::HAVE_VTK" == "true" } {
+    wokdep:SearchVTK  anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
+  }
   if { "$::CHECK_QT4" == "true" } {
     wokdep:SearchQt4     anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs
   }
@@ -347,6 +350,8 @@ checkbutton   .myFrame.myOpenClCheck   -offvalue "false" -onvalue "true" -variab
 ttk::label    .myFrame.myOpenClLbl     -text "Use OpenCL"
 checkbutton   .myFrame.myMacGLXCheck   -offvalue "false" -onvalue "true" -variable MACOSX_USE_GLX
 ttk::label    .myFrame.myMacGLXLbl     -text "Use X11 for windows drawing"
+ttk::label    .myFrame.myVtkLbl        -text "Use VTK"
+checkbutton   .myFrame.myVtkCheck      -offvalue "false" -onvalue "true" -variable HAVE_VTK       -command wokdep:gui:UpdateList
 checkbutton   .myFrame.myQt4Check      -offvalue "false" -onvalue "true" -variable CHECK_QT4      -command wokdep:gui:UpdateList
 ttk::label    .myFrame.myQt4Lbl        -text "Search Qt4"
 checkbutton   .myFrame.myJDKCheck      -offvalue "false" -onvalue "true" -variable CHECK_JDK      -command wokdep:gui:UpdateList
@@ -442,6 +447,9 @@ incr aRowIter
 grid .myFrame.myOpenClCheck   -row $aRowIter -column 0 -sticky e
 grid .myFrame.myOpenClLbl     -row $aRowIter -column 1 -sticky w
 incr aRowIter
+grid .myFrame.myVtkCheck      -row $aRowIter -column 0 -sticky e
+grid .myFrame.myVtkLbl        -row $aRowIter -column 1 -sticky w
+incr aRowIter
 if { "$::tcl_platform(os)" == "Darwin" } {
   grid .myFrame.myMacGLXCheck -row $aRowIter -column 0 -sticky e
   grid .myFrame.myMacGLXLbl   -row $aRowIter -column 1 -sticky w
index f3f8bf93085075791ac3831dfa59139cba4f1498..84beac70c9864d14315a5b27f0bebe06fd00390d 100644 (file)
@@ -18,6 +18,7 @@ set "HAVE_TBB=false"
 set "HAVE_OPENCL=false"
 set "HAVE_FREEIMAGE=false"
 set "HAVE_GL2PS=false"
+set "HAVE_VTK=false"
 set "VCVARS="
 
 rem ----- Set local settings (M$ Visual Studio compilers etc.) -----
@@ -30,6 +31,7 @@ if ["%HAVE_TBB%"]       == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH
 if ["%HAVE_OPENCL%"]    == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENCL"
 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"
 
 rem ----- Setup Environment Variables for M$ Visual Studio compilers -----
 if ["%ARCH%"] == ["32"] set VCARCH=x86
index e36f9a9da3823fac56dd48aded3dc05ea2a5dd3c..2bb6468bcc176f5c9b5830c17c923c610acc9a9f 100644 (file)
@@ -25,6 +25,7 @@ export HAVE_TBB="false";
 export HAVE_OPENCL="false";
 export HAVE_FREEIMAGE="false";
 export HAVE_GL2PS="false";
+export HAVE_VTK="false";
 export PRODUCTS_DEFINES="";
 
 # ----- Set local settings -----
@@ -44,7 +45,9 @@ fi
 if [ "$HAVE_FREEIMAGE" == "true" ]; then
   export PRODUCTS_DEFINES="$PRODUCTS_DEFINES -DHAVE_FREEIMAGE";
 fi
-
+if [ "$HAVE_VTK" == "true" ]; then
+  export PRODUCTS_DEFINES="$PRODUCTS_DEFINES -DHAVE_VTK";
+fi
 # ----- Setup Environment Variables -----
 anArch=`uname -m`
 if [ "$anArch" != "x86_64" ] && [ "$anArch" != "ia64" ]; then
index c80dbd50eaea9cb418571f533f28169ef3c53273..4ef676af96b0705337f37f7b2bb10605984bc1f2 100644 (file)
@@ -174,6 +174,11 @@ if { "$::HAVE_OPENCL" == "true" } {
     puts "  not found: OpenCL SDK (Optional, enabled)"
   }
 }
+if { "$::HAVE_VTK" == "true" } {
+  if { [wokdep:SearchVTK anErrs anErrs anErrs anErrs anErrs] == "false"} {
+    puts "  not found: VTK (Optional, enabled)"
+  }
+}
 if { "$::CHECK_QT4" == "true" } {
   if { [wokdep:SearchQt4 anErrs anErrs anErrs anErrs anErrs] == "false" } {
     puts "  not found: Qt4 (Optional, set to check)"