[vtkusers] VTK 4.0 Local?
Christopher R. Volpe
cvolpe2 at nycap.rr.com
Sat Nov 17 12:59:41 EST 2001
I had to do more than this. First of all, in my LocalUserOptions.cmake file
I had to do a:
INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Local)
otherwise DevStudio couldn't find any of my classes' header files.
Then, although it would build, my classes wouldn't be available in wish
after doing a "package require vtk". So I had to go into the Wrapping/TCL
folder, create a folder called vtklocal. In vtklocal I made a pkgIndex.tcl
file, which looked like this:
package ifneeded vtklocal 4.0 [list source [file join $dir vtklocal.tcl]]
Then I created, also in the same folder, a vtklocal.tcl file that looked
like this:
if {[info commands vtkSoundData] != "" ||
[::vtk::load_component vtkLocalTCL] == ""} {
package provide vtklocal 4.0
}
Once I did that, everything worked the way it was supposed to.
-Chris
> -----Original Message-----
> From: vtkusers-admin at public.kitware.com
> [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Berk Geveci
> Sent: Saturday, November 17, 2001 10:22 AM
> To: jdhunter at ace.bsd.uchicago.edu; vtkusers at public.kitware.com
> Subject: Re: [vtkusers] VTK 4.0 Local?
>
>
>
> Create a LocalUserOptions.cmake in the root VTK directory. On
> my build this
> looks like:
>
> # The local directory
> SUBDIRS(Work)
> # The local directory depends on all others
> SUBDIR_DEPENDS(Work Rendering Parallel Hybrid Patented)
>
> Put all the local files in this directory then create a
> CMakeLists.txt to
> add your libraries/executables. On mine, the CMakeLists.txt
> in the Work
> directory looks like this:
>
> # Create a local library
> SOURCE_FILES ( Work_SRCS
> vtkSulzerReader
> vtkSulzerStreamer
> )
> ADD_LIBRARY(vtkWork Work_SRCS)
>
> # Wrap the local library, if building shared, this library has to be
> # linked against other VTK libraries
> IF (VTK_WRAP_TCL)
> VTK_WRAP_TCL(vtkWorkTCL WorkTCL_SRCS Work_SRCS)
> ADD_LIBRARY(vtkWorkTCL WorkTCL_SRCS)
> TARGET_LINK_LIBRARIES (vtkWorkTCL
> vtkHybridTCL
> vtkParallelTCL
> vtkRenderingTCL
> vtkIOTCL
> vtkGraphicsTCL
> vtkImagingTCL
> vtkFilteringTCL
> vtkCommonTCL
> ${TCL_LIBRARY})
> ENDIF (VTK_WRAP_TCL)
>
> IF (VTK_WRAP_PYTHON)
> VTK_WRAP_PYTHON(vtkWorkPython WorkPython_SRCS Work_SRCS)
> ADD_LIBRARY(vtkWorkPython SHARED WorkPython_SRCS)
> TARGET_LINK_LIBRARIES (vtkWorkPython
> vtkHybridPython
> vtkParallelPython
> vtkRenderingPython
> vtkIOPython
> vtkGraphicsPython
> vtkImagingPython
> vtkFilteringPython
> vtkCommonPython)
> TARGET_LINK_LIBRARIES (vtkWorkPython
> debug ${PYTHON_DEBUG_LIBRARY}
> optimized ${PYTHON_LIBRARY})
> ENDIF (VTK_WRAP_PYTHON)
>
> # Link everything in this CMakeLists.txt against these libraries
> LINK_LIBRARIES (
> vtkCommon
> vtkHybrid
> vtkParallel
> vtkFiltering
> vtkImaging
> vtkGraphics
> vtkIO
> vtkRendering
> vtkPatented
> vtkWork
> )
>
> # Create some test executables
> ADD_EXECUTABLE(MultiMapView MultiMapView)
> ADD_EXECUTABLE(StreamTest StreamTest)
> ADD_EXECUTABLE(TestMarching TestMarching)
> ADD_EXECUTABLE(TestBug TestBug)
>
>
> This is more work than before but you'll find that it is a lot more
> flexible.
>
> -Berk
>
> >From: John Hunter <jdhunter at ace.bsd.uchicago.edu>
> >To: VTK Users <vtkusers at public.kitware.com>
> >Subject: [vtkusers] VTK 4.0 Local?
> >Date: Sat, 17 Nov 2001 08:54:34 -0600
> >
> >
> >I would like to use slice, the MIT 3D volume viewing extension to
> >vtk. To install it, you copy a bunch of files to the vtk
> local subdir
> >and configure --with-local. This worked fine with vtk3.2.
> >
> >I am currently working with VTK 4.0 which does not have a
> local subdir
> >and I can find nothing in the CMakeCache.txt to configure the make
> >with the local files.
> >
> >Can anyone advise me how to do this?
> >
> >Thanks,
> >John Hunter
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at:
> ><http://public.kitware.com/cgi-bin/vtkfaq>
> >Follow this link to subscribe/unsubscribe:
> >http://public.kitware.com/mailman/listinfo/vtkusers
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list