ParaView installation configuration is incomplete
I ran into 2 unexpected behaviors when building a plugin against an install folder of ParaView :
-
If ParaView was built with Ospray enabled, one must re configure Ospray. Configuration of the plugin outputs
CMake Error at /home/timothee/Dev/PARAVIEW/paraview/INSTALL/lib/cmake/paraview-5.10/vtk/VTK-vtk-module-find-packages.cmake:162 (find_package):
By not providing "Findospray.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ospray", but
CMake did not find one.
Could not find a package configuration file provided by "ospray"
[...]
[SOLVED] see #21205 (comment 1135028)
-
vtkSMMessage.h
cannot be included in a source file of a plugin. Compilation error is :
In file included from /home/timothee/Dev/PARAVIEW/paraview/INSTALL/include/paraview-5.10/vtkprotobuf/src/google/protobuf/stubs/macros.h:34,
from /home/timothee/Dev/PARAVIEW/paraview/INSTALL/include/paraview-5.10/vtkprotobuf/src/google/protobuf/stubs/common.h:48,
from /home/timothee/Dev/PARAVIEW/paraview/INSTALL/include/paraview-5.10/vtkprotobuf/src/google/protobuf/stubs/casts.h:34,
from /home/timothee/Dev/PARAVIEW/paraview/INSTALL/include/paraview-5.10/vtkprotobuf/src/google/protobuf/message.h:122,
from /home/timothee/Dev/PARAVIEW/paraview/INSTALL/include/paraview-5.10/vtk_protobuf.h:24,
from /home/timothee/Dev/PARAVIEW/paraview/INSTALL/include/paraview-5.10/vtkSMMessage.h:36,
from /home/timothee/Dev/PARAVIEW/paraview/Examples/Plugins/SMMyProxy/Plugin/MyProxy/vtkSMMyElevationProxy.cxx:5:
/home/timothee/Dev/PARAVIEW/paraview/INSTALL/include/paraview-5.10/vtkprotobuf/src/google/protobuf/stubs/port.h:47:10: fatal error: google/protobuf/port_def.inc: No such file or directory
47 | #include <google/protobuf/port_def.inc>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step to reproduce :
- Install ParaView in dir $PVINSTALL
- Apply this patch to your paraview repo (this patch will only affect the
ParaView/Examples/Plugins/SMMyProxy
source code by adding an#include "vtkSMMessage.h"
) - Build the
ParaView/Examples/Plugins/SMMyProxy
plugin against$PVINSTALL/lib/cmake/paraview-5.10
- Get both unexpected behaviors
Both behaviors work as expected when building the plugin against a build directory.
Edited by Timothee Chabat