Commit 153c1b3c authored by Brad King's avatar Brad King 💬
Browse files

ENH: Updated for modern VTK/CMake. The vtkMy example has been out of date.

parent 47d35621
......@@ -18,25 +18,21 @@ ENDIF (USE_VTK_FILE)
IF (USE_VTK_FILE)
# Standard CMake option for building libraries shared or static by default.
OPTION(BUILD_SHARED_LIBS
"Build with shared libraries."
${VTK_BUILD_SHARED_LIBS})
# This value has to be set so that it can be use in vtkmyConfigure.h.in
# otherwise the BUILD_SHARED_LIB from VTK's vtkConfigure.h file is picked
# first :(
SET(VTKMY_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} CACHE INTERNAL
"Is this VTKMY built with shared libraries.")
# Copy the CMake option to a setting with VTKMY_ prefix for use in
# our project. This name is used in vtkmyConfigure.h.in.
SET(VTKMY_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
#
# Output path(s)
#
SET (LIBRARY_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin/ CACHE PATH
SET (LIBRARY_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin CACHE PATH
"Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin/ CACHE PATH
SET (EXECUTABLE_OUTPUT_PATH ${VTKMY_BINARY_DIR}/bin CACHE PATH
"Single output directory for building all executables.")
MARK_AS_ADVANCED (
......@@ -44,16 +40,18 @@ IF (USE_VTK_FILE)
EXECUTABLE_OUTPUT_PATH
)
IF (VTK_LIBRARY_PATH AND VTK_EXECUTABLE_PATH)
# If this is a build tree, provide an option for putting
# this project's executables and libraries in with VTK's.
IF (EXISTS ${VTK_DIR}/bin)
OPTION(USE_VTK_OUTPUT_PATHS
"Use VTK library path (VTK_LIBRARY_PATH) and executable path (VTK_EXECUTABLE_PATH) as project's LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH."
"Use VTK's output directory for this project's executables and libraries."
OFF)
MARK_AS_ADVANCED (USE_VTK_OUTPUT_PATHS)
IF (USE_VTK_OUTPUT_PATHS)
SET (LIBRARY_OUTPUT_PATH ${VTK_LIBRARY_PATH})
SET (EXECUTABLE_OUTPUT_PATH ${VTK_EXECUTABLE_PATH})
SET (LIBRARY_OUTPUT_PATH ${VTK_DIR}/bin)
SET (EXECUTABLE_OUTPUT_PATH ${VTK_DIR}/bin)
ENDIF (USE_VTK_OUTPUT_PATHS)
ENDIF (VTK_LIBRARY_PATH AND VTK_EXECUTABLE_PATH)
ENDIF (EXISTS ${VTK_DIR}/bin)
ENDIF (USE_VTK_FILE)
......@@ -77,34 +75,12 @@ IF (VTK_WRAP_TCL)
"Wrap classes into the TCL interpreted language."
ON)
IF (VTKMY_WRAP_TCL)
IF (NOT VTK_WRAP_TCL_EXE)
MESSAGE("Error. Unable to find VTK_WRAP_TCL_EXE, please edit this value to specify the correct location of the VTK Tcl wrapper.")
MARK_AS_ADVANCED(CLEAR VTK_WRAP_TCL_EXE)
SET (VTKMY_CAN_BUILD 0)
ELSE (NOT VTK_WRAP_TCL_EXE)
FIND_FILE (VTK_WRAP_HINTS hints ${VTKMY_SOURCE_DIR}/Wrapping)
MARK_AS_ADVANCED(VTK_WRAP_HINTS)
IF (USE_INSTALLED_VTK)
INCLUDE (${CMAKE_ROOT}/Modules/FindTCL.cmake)
ENDIF (USE_INSTALLED_VTK)
IF (TCL_INCLUDE_PATH)
INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH})
ENDIF (TCL_INCLUDE_PATH)
ENDIF (NOT VTK_WRAP_TCL_EXE)
ENDIF (VTKMY_WRAP_TCL)
ELSE (VTK_WRAP_TCL)
IF (VTKMY_WRAP_TCL)
MESSAGE("Warning. VTKMY_WRAP_TCL is ON but the VTK version you have chosen has not support for Tcl (VTK_WRAP_TCL is OFF). Please set VTKMY_WRAP_TCL to OFF.")
MESSAGE("Warning. VTKMY_WRAP_TCL is ON but the VTK version you have "
"chosen has not support for Tcl (VTK_WRAP_TCL is OFF). "
"Please set VTKMY_WRAP_TCL to OFF.")
SET (VTKMY_WRAP_TCL OFF)
ENDIF (VTKMY_WRAP_TCL)
......@@ -121,40 +97,20 @@ IF (VTK_WRAP_PYTHON)
ON)
IF (VTKMY_WRAP_PYTHON)
IF (NOT VTK_WRAP_PYTHON_EXE)
MESSAGE("Error. Unable to find VTK_WRAP_PYTHON_EXE, please edit this value to specify the correct location of the VTK Python wrapper.")
MARK_AS_ADVANCED(CLEAR VTK_WRAP_PYTHON_EXE)
SET (VTKMY_CAN_BUILD 0)
ELSE (NOT VTK_WRAP_PYTHON_EXE)
FIND_FILE(VTK_WRAP_HINTS hints ${VTKMY_SOURCE_DIR}/Wrapping )
MARK_AS_ADVANCED(VTK_WRAP_HINTS)
IF (USE_INSTALLED_VTK)
INCLUDE (${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
ENDIF (USE_INSTALLED_VTK)
IF (PYTHON_INCLUDE_PATH)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
ENDIF (PYTHON_INCLUDE_PATH)
IF (WIN32)
IF (NOT BUILD_SHARED_LIBS)
MESSAGE("Error. Python support requires BUILD_SHARED_LIBS to be ON.")
SET (VTKMY_CAN_BUILD 0)
ENDIF (NOT BUILD_SHARED_LIBS)
ENDIF (WIN32)
ENDIF (NOT VTK_WRAP_PYTHON_EXE)
IF (WIN32)
IF (NOT BUILD_SHARED_LIBS)
MESSAGE("Error. Python support requires BUILD_SHARED_LIBS to be ON.")
SET (VTKMY_CAN_BUILD 0)
ENDIF (NOT BUILD_SHARED_LIBS)
ENDIF (WIN32)
ENDIF (VTKMY_WRAP_PYTHON)
ELSE (VTK_WRAP_PYTHON)
IF (VTKMY_WRAP_PYTHON)
MESSAGE("Warning. VTKMY_WRAP_PYTHON is ON but the VTK version you have chosen has not support for Python (VTK_WRAP_PYTHON is OFF). Please set VTKMY_WRAP_PYTHON to OFF.")
MESSAGE("Warning. VTKMY_WRAP_PYTHON is ON but the VTK version you have "
"chosen has not support for Python (VTK_WRAP_PYTHON is OFF). "
"Please set VTKMY_WRAP_PYTHON to OFF.")
SET (VTKMY_WRAP_PYTHON OFF)
ENDIF (VTKMY_WRAP_PYTHON)
......@@ -171,60 +127,28 @@ IF (VTK_WRAP_JAVA)
ON)
IF (VTKMY_WRAP_JAVA)
IF (NOT VTK_WRAP_JAVA_EXE)
MESSAGE("Error. Unable to find VTK_WRAP_JAVA_EXE, please edit this value to specify the correct location of the VTK Java wrapper.")
MARK_AS_ADVANCED(CLEAR VTK_WRAP_JAVA_EXE)
SET (VTKMY_CAN_BUILD 0)
ENDIF (NOT VTK_WRAP_JAVA_EXE)
IF (NOT VTK_PARSE_JAVA_EXE)
MESSAGE("Error. Unable to find VTK_PARSE_JAVA_EXE, please edit this value to specify the correct location of the VTK Java parser.")
MARK_AS_ADVANCED(CLEAR VTK_PARSE_JAVA_EXE)
SET (VTKMY_CAN_BUILD 0)
ENDIF (NOT VTK_PARSE_JAVA_EXE)
IF (VTK_WRAP_JAVA_EXE AND VTK_PARSE_JAVA_EXE)
FIND_FILE(VTK_WRAP_HINTS hints ${VTKMY_SOURCE_DIR}/Wrapping )
MARK_AS_ADVANCED(VTK_WRAP_HINTS)
IF (USE_INSTALLED_VTK)
INCLUDE (${CMAKE_ROOT}/Modules/FindJNI.cmake)
ENDIF (USE_INSTALLED_VTK)
IF (JAVA_INCLUDE_PATH)
INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})
ENDIF (JAVA_INCLUDE_PATH)
IF (JAVA_INCLUDE_PATH2)
INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH2})
ENDIF (JAVA_INCLUDE_PATH2)
IF (JAVA_AWT_INCLUDE_PATH)
INCLUDE_DIRECTORIES(${JAVA_AWT_INCLUDE_PATH})
ENDIF (JAVA_AWT_INCLUDE_PATH)
IF (NOT VTK_JAVA_HOME)
SET (VTK_JAVA_HOME ${VTKMY_BINARY_DIR}/java/vtk CACHE PATH "Path to Java install")
ENDIF (NOT VTK_JAVA_HOME)
IF (WIN32)
IF (NOT BUILD_SHARED_LIBS)
MESSAGE("Error. Java support requires BUILD_SHARED_LIBS to be ON.")
SET (VTKMY_CAN_BUILD 0)
ENDIF (NOT BUILD_SHARED_LIBS)
ENDIF (WIN32)
ENDIF (VTK_WRAP_JAVA_EXE AND VTK_PARSE_JAVA_EXE)
IF (WIN32)
IF (NOT BUILD_SHARED_LIBS)
MESSAGE("Error. Java support requires BUILD_SHARED_LIBS to be ON.")
SET (VTKMY_CAN_BUILD 0)
ENDIF (NOT BUILD_SHARED_LIBS)
ENDIF (WIN32)
# Tell the java wrappers where to go.
SET(VTK_JAVA_HOME ${VTKMY_BINARY_DIR}/java/vtkmy)
MAKE_DIRECTORY(${VTK_JAVA_HOME})
ENDIF (VTKMY_WRAP_JAVA)
ELSE (VTK_WRAP_JAVA)
IF (VTKMY_WRAP_JAVA)
MESSAGE("Warning. VTKMY_WRAP_JAVA is ON but the VTK version you have chosen has not support for Java (VTK_WRAP_JAVA is OFF). Please set VTKMY_WRAP_JAVA to OFF.")
MESSAGE("Warning. VTKMY_WRAP_JAVA is ON but the VTK version you have "
"chosen has not support for Java (VTK_WRAP_JAVA is OFF). "
"Please set VTKMY_WRAP_JAVA to OFF.")
SET (VTKMY_WRAP_JAVA OFF)
ENDIF (VTKMY_WRAP_JAVA)
ENDIF (VTK_WRAP_JAVA)
# Setup our local hints file in case wrappers need them.
SET(VTK_WRAP_HINTS ${VTKMY_SOURCE_DIR}/Wrapping/hints)
......@@ -4,80 +4,38 @@
# Here is where you can add the name of your local common classes.
#
SOURCE_FILES (Common_SRCS
SET (Common_SRCS
vtkBar.cxx
)
# --------------------------------------------------------------------------
# You probably do not need to modify anything below this line
#
# Create the vtkmyCommon C++ library
#
ADD_LIBRARY (vtkmyCommon Common_SRCS)
#
# Create the vtkmyCommon Tcl library
#
# Create the vtkmyCommon C++ library.
ADD_LIBRARY (vtkmyCommon ${Common_SRCS})
TARGET_LINK_LIBRARIES (vtkmyCommon vtkCommon)
# Create the vtkmyCommon Tcl library.
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
VTK_WRAP_TCL (vtkmyCommonTCL CommonTCL_SRCS Common_SRCS)
ADD_LIBRARY (vtkmyCommonTCL CommonTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyCommonTCL
vtkCommonTCL
${TCL_LIBRARY})
VTK_WRAP_TCL (vtkmyCommonTCL CommonTCL_SRCS ${Common_SRCS})
ADD_LIBRARY (vtkmyCommonTCL ${CommonTCL_SRCS})
TARGET_LINK_LIBRARIES (vtkmyCommonTCL vtkmyCommon vtkCommonTCL)
ENDIF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
#
# Create the vtkmyCommon Python library
#
# Create the vtkmyCommon Python library.
IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
VTK_WRAP_PYTHON (vtkmyCommonPython CommonPython_SRCS Common_SRCS)
VTK_WRAP_PYTHON (vtkmyCommonPython CommonPython_SRCS ${Common_SRCS})
IF (APPLE)
ADD_LIBRARY (vtkmyCommonPython MODULE CommonPython_SRCS)
ADD_LIBRARY (vtkmyCommonPython MODULE ${CommonPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY (vtkmyCommonPython SHARED CommonPython_SRCS)
TARGET_LINK_LIBRARIES (vtkmyCommonPython
vtkCommonPython)
ADD_LIBRARY (vtkmyCommonPython SHARED ${CommonPython_SRCS})
ENDIF (APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkmyCommonPython
vtkCommonPython
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
ELSE(WIN32)
TARGET_LINK_LIBRARIES (vtkmyCommonPython
vtkCommonPython
${PYTHON_LIBRARY})
ENDIF(WIN32)
TARGET_LINK_LIBRARIES (vtkmyCommonPython vtkmyCommon vtkCommonPython)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
#
# Create the vtkmyCommon Java library
#
# Create the vtkmyCommon Java library.
IF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
VTK_WRAP_JAVA (vtkmyCommonJava CommonJava_SRCS Common_SRCS)
ADD_LIBRARY (vtkmyCommonJava SHARED CommonJava_SRCS)
TARGET_LINK_LIBRARIES (vtkmyCommonJava
vtkCommonJava)
VTK_WRAP_JAVA (vtkmyCommonJava CommonJava_SRCS ${Common_SRCS})
ADD_LIBRARY (vtkmyCommonJava SHARED ${CommonJava_SRCS})
TARGET_LINK_LIBRARIES (vtkmyCommonJava vtkmyCommon vtkCommonJava)
ENDIF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
#
# Link to VTK and local
#
LINK_LIBRARIES (
vtkmyCommon
vtkCommon
)
......@@ -2,34 +2,3 @@ SUBDIRS(
Ex1
Ex2
)
#
# Link to VTK and local
#
LINK_LIBRARIES (
vtkmyUnsorted
vtkIO
vtkGraphics
vtkmyImaging
vtkImaging
vtkFiltering
vtkmyCommon
vtkCommon
)
IF (VTK_USE_HYBRID)
LINK_LIBRARIES (vtkHybrid)
ENDIF (VTK_USE_HYBRID)
IF (VTK_USE_PARALLEL)
LINK_LIBRARIES (vtkParallel)
ENDIF (VTK_USE_PARALLEL)
IF (VTK_USE_PATENTED)
LINK_LIBRARIES (vtkPatented)
ENDIF (VTK_USE_PATENTED)
IF (VTK_USE_RENDERING)
LINK_LIBRARIES (vtkRendering)
ENDIF (VTK_USE_RENDERING)
......@@ -3,3 +3,4 @@
#
ADD_EXECUTABLE(vtkmyEx1 vtkmyEx1.cxx)
TARGET_LINK_LIBRARIES(vtkmyEx1 vtkmyUnsorted)
......@@ -3,3 +3,4 @@
#
ADD_EXECUTABLE(vtkmyEx2 vtkmyEx2.cxx)
TARGET_LINK_LIBRARIES(vtkmyEx2 vtkmyUnsorted)
......@@ -4,97 +4,38 @@
# Here is where you can add the name of your local imaging classes.
#
SOURCE_FILES (Imaging_SRCS
SET (Imaging_SRCS
vtkImageFoo.cxx
)
# --------------------------------------------------------------------------
# You probably do not need to modify anything below this line
#
# Create the vtkmyImaging C++ library
#
ADD_LIBRARY (vtkmyImaging Imaging_SRCS)
ADD_LIBRARY (vtkmyImaging ${Imaging_SRCS})
TARGET_LINK_LIBRARIES(vtkmyImaging vtkmyCommon vtkImaging)
#
# Create the vtkmyImaging Tcl library
#
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
VTK_WRAP_TCL (vtkmyImagingTCL ImagingTCL_SRCS Imaging_SRCS)
ADD_LIBRARY (vtkmyImagingTCL ImagingTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyImagingTCL
vtkImagingTCL
vtkFilteringTCL
vtkmyCommonTCL
vtkCommonTCL
${TCL_LIBRARY})
VTK_WRAP_TCL (vtkmyImagingTCL ImagingTCL_SRCS ${Imaging_SRCS})
ADD_LIBRARY (vtkmyImagingTCL SHARED ${ImagingTCL_SRCS})
TARGET_LINK_LIBRARIES (vtkmyImagingTCL vtkmyCommonTCL vtkmyImaging)
ENDIF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
#
# Create the vtkmyImaging Python library
#
# Create the vtkmyImaging Python library.
IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
VTK_WRAP_PYTHON (vtkmyImagingPython ImagingPython_SRCS Imaging_SRCS)
VTK_WRAP_PYTHON (vtkmyImagingPython ImagingPython_SRCS ${Imaging_SRCS})
IF (APPLE)
ADD_LIBRARY (vtkmyImagingPython MODULE ImagingPython_SRCS)
ADD_LIBRARY (vtkmyImagingPython MODULE ${ImagingPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY (vtkmyImagingPython SHARED ImagingPython_SRCS)
TARGET_LINK_LIBRARIES (vtkmyImagingPython
vtkImagingPython
vtkFilteringPython
vtkmyCommonPython
vtkCommonPython)
ADD_LIBRARY (vtkmyImagingPython SHARED ${ImagingPython_SRCS})
ENDIF (APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkmyImagingPython
vtkImagingPython
vtkFilteringPython
vtkmyCommonPython
vtkCommonPython
debug ${PYTHON_DEBUG_LIBRARY}
optimized ${PYTHON_LIBRARY})
ELSE(WIN32)
TARGET_LINK_LIBRARIES (vtkmyImagingPython
vtkImagingPython
vtkFilteringPython
vtkmyCommonPython
vtkCommonPython
${PYTHON_LIBRARY})
ENDIF(WIN32)
TARGET_LINK_LIBRARIES (vtkmyImagingPython vtkmyCommonPython vtkmyImaging)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
#
# Create the vtkmyImaging Java library
#
# Create the vtkmyImaging Java library.
IF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
VTK_WRAP_JAVA (vtkmyImagingJava ImagingJava_SRCS Imaging_SRCS)
ADD_LIBRARY (vtkmyImagingJava SHARED ImagingJava_SRCS)
TARGET_LINK_LIBRARIES (vtkmyImagingJava
vtkImagingJava
vtkFilteringJava
vtkmyCommonJava
vtkCommonJava)
VTK_WRAP_JAVA (vtkmyImagingJava ImagingJava_SRCS ${Imaging_SRCS})
ADD_LIBRARY (vtkmyImagingJava SHARED ${ImagingJava_SRCS})
TARGET_LINK_LIBRARIES (vtkmyImagingJava vtkmyCommonJava vtkmyImaging)
ENDIF (VTK_WRAP_JAVA AND VTKMY_WRAP_JAVA)
#
# Link to VTK and local
#
LINK_LIBRARIES (
vtkmyImaging
vtkImaging
vtkFiltering
vtkmyCommon
vtkCommon
)
Introduction:
-------------
This directory demonstrates how to organize a local source repository where local VTK classes can be compiled and wrapped into C++/Tcl/Java/Python libraries without interferring with the main VTK source dir.
This directory demonstrates how to organize a local source repository
where local VTK classes can be compiled and wrapped into
C++/Tcl/Java/Python libraries without interferring with the main VTK
source dir.
It might be good thing to sort local classes into different 'package' directories like VTK does (Common, Rendering, Filtering, Imaging, IO, etc.). It prevents numerous dependencies problems and provides a better overview of the class hierarchy.
It might be good thing to sort local classes into different 'package'
directories like VTK does (Common, Rendering, Filtering, Imaging, IO,
etc.). It prevents numerous dependencies problems and provides a
better overview of the class hierarchy.
- this example enforces this 'package' organization by referring to a vtkBar class into the Common/ directory and a vtkImageFoo class into the Imaging/ directory (the later uses an instance of vtkBar to "work", thus demonstrating how CMake resolves dependencies between both directories).
- this example enforces this 'package' organization by referring to a
vtkBar class into the Common/ directory and a vtkImageFoo class into
the Imaging/ directory (the later uses an instance of vtkBar to
"work", thus demonstrating how CMake resolves dependencies between
both directories).
Nevertheless, if you do not care about this ordering, you might just put your classes into the Unsorted/ directory, like the vtkBar2 class for example. By default, members of the Unsorted package will depend on all other packages and will be linked against all VTK packages too.
Nevertheless, if you do not care about this ordering, you might just
put your classes into the Unsorted/ directory, like the vtkBar2 class
for example. By default, members of the Unsorted package will depend
on all other packages and will be linked against all VTK packages too.
What you should do:
-------------------
- Copy this vtkMy directory to a different out-of-source place, and remove all CVS subdirs to avoid any accidental commit to the main VTK CVS.
- Copy this vtkMy directory to a different out-of-source place, and
remove all CVS subdirs to avoid any accidental commit to the main VTK
CVS.
- Fill the subdirs with your own classes. Remove the dummy classes if needed. For each CMakeList.txt in the package dirs, add or remove the class(es) pertaining to this directory (SOURCE_FILES command). Depending on the directory, your class must #include "vtkmy*Win32Header.h" (see dummy vlasses for example) and use the according VTK_MY_*_EXPORT macro after the 'class' keyword to ensure proper DLL build.
- Fill the subdirs with your own classes. Remove the dummy classes if
needed. For each CMakeList.txt in the package dirs, add or remove the
class(es) pertaining to this directory (SET command). Depending on
the directory, your class must #include "vtkmy*Win32Header.h"
(see dummy classes for example) and use the corresponding VTK_MY_*_EXPORT
macro after the 'class' keyword to ensure proper DLL build.
- Run CMake as usual. Use your vtkMy local dir as source dir, and choose whatever build directory. Your VTK build- or install- directory should be found automatically.
- Run CMake as usual. Use your vtkMy local dir as source dir, and
choose whatever build directory. Your VTK build- or install- directory
should be found automatically.
- Build your repository.
- Build your project.
- Add the path to your build-dir bin/ directory to your PATH environment variable (as well as LD_LIBRARY_PATH for Unix users), so these C++ and Tcl DLL can be found (if any).
- Add the path to your build-dir bin/ directory to your PATH
environment variable (as well as LD_LIBRARY_PATH for Unix users), so
these C++ and Tcl DLL can be found (if any).
- Add the path to your vtkMy/Wrapping/Tcl directory to your TCLLIBPATH environment variable. TCLLIBPATH is a space separated set of paths to Tcl libraries. Windows users should use forward slashes (/) instead of the usual backward slashes (\), and should surround the path by quotes (") if it contains any space.
- Add the path to your vtkMy/Wrapping/Tcl directory to your TCLLIBPATH
environment variable. TCLLIBPATH is a space separated set of paths to
Tcl libraries. Windows users should use forward slashes (/) instead of
the usual backward slashes (\), and should surround the path by quotes
(") if it contains any space.
Distribute or exchange your modules:
------------------------------------
Ideally, if you plan to exchange or distribute your modules then you should rename the vtkmy lib prefix to something more personal or unique. You might use your initials for example. In a nutshell, if you were to choose vtksb, then you should take care of the following:
Ideally, if you plan to exchange or distribute your modules then you
should rename the vtkmy lib prefix to something more personal or
unique. You might use your initials for example. In a nutshell, if you
were to choose vtksb, then you should take care of the following:
- Search for the vtkmy string and replace it with vtksb in all files.
- In the same way, replace VTKMY by VTKSB.
- Rename all vtkmy* files *and* directories to vtksb* (this should only concern files like vtkmy*Win32Header.h for example).
- In all *Win32Header.h files and VTK headers, change VTK_MY_*_EXPORT to VTK_SB_*_EXPORT. Sorry for the inconvenience, but the wrappers expect this symbol to start with VTK_, thus VTKMY_*_EXPORT could not be used.
- Rename all vtkmy* files *and* directories to vtksb* (this should
only concern files like vtkmy*Win32Header.h for example).
- In all *Win32Header.h files and VTK headers, change
VTK_MY_*_EXPORT to VTK_SB_*_EXPORT. Sorry for the inconvenience, but
the wrappers expect this symbol to start with VTK_, thus
VTKMY_*_EXPORT could not be used.
Any prefix should work, but make sure that your class names start with 'vtk', otherwise the wrappers will fail (hence the vtksb or vtkmy prefix, not sbvtk or myvtk). A safe bet is to use something starting 'vtk' in a consistent way.
Any prefix should work, but make sure that your class names start with
'vtk', otherwise the wrappers will fail (hence the vtksb or vtkmy
prefix, not sbvtk or myvtk). A safe bet is to use something starting
'vtk' in a consistent way.
......@@ -11,163 +11,47 @@ SOURCE_FILES (Unsorted_SRCS
# --------------------------------------------------------------------------
# You probably do not need to modify anything below this line
#
# Create the vtkmyUnsorted C++ library
#
ADD_LIBRARY (vtkmyUnsorted Unsorted_SRCS)
#
# Create the vtkmyUnsorted Tcl library
#
IF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
# Create the vtkmyUnsorted C++ library.
ADD_LIBRARY (vtkmyUnsorted ${Unsorted_SRCS})
TARGET_LINK_LIBRARIES(vtkmyUnsorted vtkmyImaging vtkGraphics vtkIO)
VTK_WRAP_TCL (vtkmyUnsortedTCL UnsortedTCL_SRCS Unsorted_SRCS)
ADD_LIBRARY (vtkmyUnsortedTCL UnsortedTCL_SRCS)
TARGET_LINK_LIBRARIES (vtkmyUnsortedTCL
vtkIOTCL
vtkGraphicsTCL
vtkmyImagingTCL
vtkImagingTCL
vtkFilteringTCL
vtkmyCommonTCL
vtkCommonTCL
${TCL_LIBRARY})
IF (VTK_USE_HYBRID)
TARGET_LINK_LIBRARIES (vtkmyUnsortedTCL vtkHybridTCL)
ENDIF (VTK_USE_HYBRID)
IF (VTK_USE_HYBRID)
TARGET_LINK_LIBRARIES (vtkmyUnsorted vtkHybrid)
ENDIF (VTK_USE_HYBRID)
IF (VTK_USE_PARALLEL)
TARGET_LINK_LIBRARIES (vtkmyUnsortedTCL vtkParallelTCL)
ENDIF (VTK_USE_PARALLEL)
IF (VTK_USE_PARALLEL)
TARGET_LINK_LIBRARIES (vtkmyUnsorted vtkParallel)
ENDIF (VTK_USE_PARALLEL)
IF (VTK_USE_PATENTED)
TARGET_LINK_LIBRARIES (vtkmyUnsortedTCL vtkPatentedTCL)
ENDIF (VTK_USE_PATENTED)
IF (VTK_USE_PATENTED)
TARGET_LINK_LIBRARIES (vtkmyUnsorted vtkPatented)
ENDIF (VTK_USE_PATENTED)
IF (VTK_USE_RENDERING)
TARGET_LINK_LIBRARIES (vtkmyUnsortedTCL vtkRenderingTCL)
ENDIF (VTK_USE_RENDERING)
IF (VTK_USE_RENDERING)
TARGET_LINK_LIBRARIES (vtkmyUnsorted vtkRendering)
ENDIF (VTK_USE_RENDERING)