[Paraview] error loading local library

Brad King brad.king at kitware.com
Thu, 15 Jan 2004 15:43:02 -0500 (EST)


On Mon, 5 Jan 2004, Brad King wrote:

> I'll have to setup some new support in the new client/server wrappers to
> build them for external packages.  Hopefully I will get this done in the
> next couple of days.

This is now implemented.  A third-party project can build a ParaView
plugin using CMake code like this:

-----------------------------------------------------------------
PROJECT(MYPACKAGE)
INCLUDE_DIRECTORIES(${MYPACKAGE_SOURCE_DIR})

# Import ParaView build settings.
FIND_PACKAGE(ParaView)
IF(ParaView_FOUND)
  INCLUDE(${PARAVIEW_USE_FILE})
ELSE(ParaView_FOUND)
  MESSAGE(FATAL_ERROR "ParaView is required.  Set ParaView_DIR.")
ENDIF(ParaView_FOUND)

# List of classes for the plugin.
SET(mypackage_SRCS vtkMyClass.cxx)

# Create vtk client/server wrappers for the classes.
VTK_WRAP_ClientServer(mypackage mypackageCS_SRCS ${mypackage_SRCS})

# Build the package as a plugin for ParaView.
ADD_LIBRARY(mypackage MODULE ${mypackage_SRCS} ${mypackageCS_SRCS})
TARGET_LINK_LIBRARIES(mypackage vtkClientServer)
-----------------------------------------------------------------

Then you can write an XML package configuration file like this:

<ModuleInterfaces>
 <Library name="mypackage"/>
 <!-- ... describe interfaces here ... -->
</ModuleInterfaces>

-Brad