[vtkusers] Re: problem for build VTK and TCL/TK at Windows

Goodwin Lawlor goodwin.lawlor at ucd.ie
Thu Jun 15 16:30:22 EDT 2006


Lin, Lan wrote:
> Hi all,
> 
>        I am successful to build the VTK without VTK_WRAP_TCL on using 
> Cmake. But When I turn VTK_WRAP_TCL on, the error message pops up and 
> says that Cmake error: empty include directory passed into 
> INCLUDE_DIRECTORIES COMMAND. I checked the tcl_include_path , 
> tcl_library_path, tk_include_path, tk_library_path setting in Cmake. The 
> settings look good.
> 
>        Any response and help will be greatly appreciated

Hi,

Looks like you're trying to build vtk against TclTk8.5... which isn't 
supported.

The empty include is VTK_TK_RESOURCES_DIR (line 38 
\Wrapping\Tcl\CmakeLists.txt) because the resources haven't been 
included in \Utilities\TclTk for 8.5

If you built tk from source, then you have the resources- you just have 
to let cmake know where they are... apply this patch if you're feeling 
adventurous:

Index: Wrapping/Tcl/vtkDetermineTkResources.cmake
===================================================================
RCS file: /cvsroot/VTK/VTK/Wrapping/Tcl/vtkDetermineTkResources.cmake,v
retrieving revision 1.4
diff -u -r1.4 vtkDetermineTkResources.cmake
--- Wrapping/Tcl/vtkDetermineTkResources.cmake	10 Dec 2005 05:18:37 
-0000	1.4
+++ Wrapping/Tcl/vtkDetermineTkResources.cmake	15 Jun 2006 20:08:05 -0000
@@ -10,6 +10,10 @@
            SET(VTK_TK_RESOURCES_DIR ${dir} CACHE INTERNAL
              "The directory where the tk.rc and other Tk resource files 
can be found. They are required to add the proper resources to a Tk 
command-line interpreter (vtk.exe for example)")
            INCLUDE_DIRECTORIES(${VTK_TK_RESOURCES_DIR})
+        ELSE (EXISTS ${VTK_TK_RESOURCE_FILE_TRY})
+          GET_FILENAME_COMPONENT(dir ${TK_INTERNAL_PATH}/rc/tk.rc PATH)
+          SET(VTK_TK_RESOURCES_DIR ${dir} CACHE INTERNAL
+            "The directory where the tk.rc and other Tk resource files 
can be found. They are required to add the proper resources to a Tk 
command-line interpreter (vtk.exe for example)")
          ENDIF (EXISTS ${VTK_TK_RESOURCE_FILE_TRY})
        ENDIF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
      ENDIF(NOT CYGWIN)

This wont be the end of your compiling problems though (I wont spoil the 
surprise!)


hth,

Goodwin




More information about the vtkusers mailing list