Wrapping Filter of Plugin

Hi,
I wrote a plugin, which delivers a filter in C++. Now I would like to wrap my plugin with python. My file-structure looks like this:

  • CMakeLists.txt
  • Plugin
    • paraview.plugin
    • CMakeLists.txt
    • Filter
      • CMakeLists.txt
      • vtk.module
      • Filter.xml
      • Filter.cxx
      • Filter.h

I tried to wrap my vtk module with python too using the following Plugin/Filter/CMakeLists.txt:

set(classes
  Filter)

vtk_module_add_module(VTK::CustomFilters
  CLASSES ${classes})

paraview_add_server_manager_xmls(
  XMLS  Filter.xml)

vtk_module_wrap_python(
  MODULES VTK::CustomFilters
)

How should I do it correct?

vtk_module_wrap_python needs to be called from the same level as vtk_module_build. That is when the modules have all of the relevant information attached to them (headers, dependencies, etc.) that is used by the wrapping code.