How to add include directories to manual plugin build

We have a plugin which we build for many years for PV. We adopted it to the new structure and it works fine with the plugin-builder.

For Mac I try to integrate it with the paraview-superbuild. I have a superbuild in pv_build with system qt5 and system boost (as Catalina requires boost 1.73+ to compile with its new clang). Adding the plugin to the superbuild is ignored, but this is another question. I tried to compile the plugin manually via
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DParaView_DIR:PATH=/Users/fwein/code/ps_build/install/lib/cmake/paraview-5.8 -DQt5_DIR=/usr/local/Cellar/qt/5.15.0/lib/cmake/Qt5 ..
within the plugin directory. It works in principle, but the includes for boost and hdf5 and the boost libs are missing. Compiling with VERBOSE=1 and adding the missing options works and produces a usable plugin .so.

My question is, how I can add this options to the build configuration. It works as it is with the plugin-builder. Possibly the correct answer is just basic cmake-knowledge I lack.

This is our directory structure

├── CMakeLists.txt
├── Plugin
│   ├── CFSReader
│   │   ├── CFSReader.xml
│   │   ├── CMakeLists.txt
│   │   ├── vtk.module
│   │   ├── vtkCFSReader.cxx
│   │   └── vtkCFSReader.h
│   ├── CFSReader.cxx
│   ├── CFSReader.h
│   ├── CMakeLists.txt
│   ├── hdf5Common.cc
│   ├── hdf5Common.h
│   ├── hdf5Reader.cc
│   ├── hdf5Reader.h
│   └── paraview.plugin

I need the information in the Plugin directory for the .cc files. The CMakeLists.txt there has the content

PARAVIEW_ADD_PLUGIN(CFSReader
  REQUIRED_ON_SERVER
  VERSION "20.08"
  MODULES CFSReaderModules
  MODULE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/CFSReader/vtk.module"
  SOURCES hdf5Common.cc hdf5Reader.cc

“${CMAKE_CURRENT_SOURCE_DIR}/doc”
)

I do not know, how to add flags and include there.

Thanks for any help! We are currently in the process of making our software open source (MIT) and then hope to add our reader upstream …

I scanned the existing plugins for include or boost usage, but found no matching example. Help is very much appreciated :slight_smile:

You have to look for (and find) boost and hdf5 to be able to use it.

You can use VTK::hdf5 (and the vtk_hdf.h and vtk_hdf_hl.h headers) to use the same HDF5 that VTK built with. For Boost, you’ll need to find_package(Boost) and link to the targets you need yourself.