https://public.kitware.com/Wiki/index.php?title=Paraview_Make_building_Paraview_plugin_optional&feed=atom&action=historyParaview Make building Paraview plugin optional - Revision history2024-03-29T10:22:22ZRevision history for this page on the wikiMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=Paraview_Make_building_Paraview_plugin_optional&diff=17736&oldid=prevDaviddoria: New page: If you develop a VTK filter for which you would like to make a Paraview plugin, it is nice to distribute it in a way that it can be used by users with only VTK as strictly a VTK filter, or...2009-11-29T18:01:06Z<p>New page: If you develop a VTK filter for which you would like to make a Paraview plugin, it is nice to distribute it in a way that it can be used by users with only VTK as strictly a VTK filter, or...</p>
<p><b>New page</b></p><div>If you develop a VTK filter for which you would like to make a Paraview plugin, it is nice to distribute it in a way that it can be used by users with only VTK as strictly a VTK filter, or by users with both VTK and Paraview as a VTK filter and a Paraview plugin. To do this, the directory structure should be as follows:<br />
<source lang="text"><br />
..../MyFilter/MyFilter.h<br />
..../MyFilter/MyFilter.cxx<br />
..../MyFilter/CMakeLists.txt<br />
..../MyFilter/plugin/CMakeLists.txt<br />
..../MyFilter/plugin/MyFilter.xml<br />
</source><br />
<br />
The MyFilter/CMakeLists.txt should look like<br />
<source lang="text"><br />
cmake_minimum_required(VERSION 2.6)<br />
if(COMMAND cmake_policy)<br />
cmake_policy(SET CMP0003 NEW)<br />
endif(COMMAND cmake_policy)<br />
<br />
PROJECT(vtkPointSetOutlierRemoval)<br />
<br />
FIND_PACKAGE(VTK REQUIRED)<br />
INCLUDE(${VTK_USE_FILE})<br />
<br />
SET(BUILD_PARAVIEW_PLUGIN OFF CACHE BOOL "Build Paraview plugin?")<br />
<br />
if(BUILD_PARAVIEW_PLUGIN)<br />
SUBDIRS(plugin)<br />
endif(BUILD_PARAVIEW_PLUGIN)<br />
<br />
ADD_EXECUTABLE(vtkMyFilter Demo.cxx vtkMyFilter.cxx)<br />
TARGET_LINK_LIBRARIES(vtkMyFilter vtkHybrid )<br />
<br />
</source><br />
<br />
and the MyFilter/plugin/CMakeLists.txt should look like<br />
<source lang="text"><br />
FIND_PACKAGE(ParaView REQUIRED)<br />
INCLUDE(${PARAVIEW_USE_FILE})<br />
<br />
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ../)<br />
<br />
ADD_PARAVIEW_PLUGIN(MyFilter "1.0"<br />
SERVER_MANAGER_XML MyFilterxml<br />
SERVER_MANAGER_SOURCES ../MyFilter.cxx<br />
)<br />
<br />
</source></div>Daviddoria