set(interfaces)
set(classes
  pqJupyterKernelLauncher.cxx
  pqJupyterPluginActions.cxx
  pqJupyterPluginTraceReaction.cxx
  PVInterpreter.cxx
  PVKernelServer.cxx
  )

find_package(xeus REQUIRED)

paraview_plugin_add_action_group(
  CLASS_NAME pqJupyterPluginActions
  GROUP_NAME "ToolBar/JupyterPluginActions"
  INTERFACES action_interfaces
  SOURCES action_sources)
list(APPEND interfaces
  ${action_interfaces})
list(APPEND classes
  ${action_sources})

paraview_plugin_add_auto_start(
  CLASS_NAME pqJupyterKernelLauncher
  STARTUP onStartup
  SHUTDOWN onShutdown
  INTERFACES autostart_interface
  SOURCES autostart_sources)

list(APPEND interfaces
  ${autostart_interface})
list(APPEND classes
  ${autostart_sources})

paraview_add_plugin(${PROJECT_NAME}
  VERSION "1.0"
  UI_INTERFACES ${interfaces}
  SOURCES ${classes})

target_link_libraries(${PROJECT_NAME} PRIVATE xeus)
target_link_libraries(${PROJECT_NAME} PRIVATE VTK::PythonInterpreter)
target_link_libraries(${PROJECT_NAME} PRIVATE ParaView::pqApplicationComponents)
target_link_libraries(${PROJECT_NAME} PRIVATE ParaView::pqPython)
