<div dir="ltr"><div><div>Hi,<br><br>I wanted to setup a project that built VTK libraries using the modern vtk module cmake code, added Python wrapping to the VTK libraries, and then built a ParaView plugin that linked against the VTK libraries.<br>
<br></div>Traditionally, a ParaView plugin is created by compiling all the cxx files into the plugin library, but I wanted my files compiled into a standard VTK module library, and I wanted Python wrappers so that I could import my vtk module library in Python.<br>
<br>Here's the example project.<br><br><a href="https://github.com/patmarion/PythonWrappedPluginExample">https://github.com/patmarion/PythonWrappedPluginExample</a><br><br><br>It works, I tested it on ParaView master, but I had to comment out some lines in ParaViewPlugins.cmake to avoid configure errors. If a someone who knows the pv_setup_module_environment() macro wants to give this a shot and see why it doesn't work, please let me know! <b>It seems that pv_setup_module_environment() is broken:</b><br>
<br>CMake Error at ParaView/VTK/CMake/vtkModuleAPI.cmake:44 (message):<br> No such module: "AutobahnPython"<br>Call Stack (most recent call first):<br> ParaView/CMake/ParaViewPlugins.cmake:1300 (vtk_module_load)<br>
Module/CMakeLists.txt:2 (pv_setup_module_environment)<br><br><br></div><div>I had to comment out a foreach loop to make it configure:<br><br>diff --git a/CMake/ParaViewPlugins.cmake b/CMake/ParaViewPlugins.cmake<br>index dcf53f9..12b139e 100644<br>
--- a/CMake/ParaViewPlugins.cmake<br>+++ b/CMake/ParaViewPlugins.cmake<br>@@ -1296,7 +1296,8 @@ macro(pv_setup_module_environment _name)<br> include(vtkModuleAPI)<br> include(vtkClientServerWrapping)<br> # load information about existing modules.<br>
- foreach (mod IN LISTS VTK_MODULES_ENABLED)<br>- vtk_module_load("${mod}")<br>- endforeach()<br>+ #foreach (mod IN LISTS VTK_MODULES_ENABLED)<br>+ # vtk_module_load("${mod}")<br>+ # endif()<br>
+ #endforeach()<br> endmacro()<br><br></div><div><br></div>Pat<br></div>