Despite some pointers from @Joachim_Pouderoux and references to the build.md, I’m still not getting very far with compiling additional addons with ParaView-5.7.0 or with using VTK libraries from the paraview installation.
I’ve listed the basic categories of issues that I’m encountered as scenarios and leave it the to KitWare people if we keep this as a single topic, split it up, or spin off into a FAQ.
Scenario 1:
Code using VTK, where I have previously successfully used ParaView VTK libraries:
elseif (EXISTS "$ENV{ParaView_DIR}")
message("Building with Paraview from $ENV{ParaView_DIR}")
find_package(ParaView REQUIRED HINTS $ENV{ParaView_DIR})
else()
This appears to continue working adequately, but whereas previously the ParaViewConfig.cmake
would contain references to VTK_CONFIG_FILE
and also define list(APPEND VTK_INCLUDE_DIRS ...)
, the mechanism for 5.7.0 has been changed and I can’t find docs describing how the update should look like. Specifically, the following bit fails since it cannot find the include/libs:
try_compile(MYPROG_USING_VTK_MPI
${CMAKE_CURRENT_BINARY_DIR} ${test_file}
LINK_LIBRARIES vtkParallelMPI
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${VTK_INCLUDE_DIRS}"
)
The vtkMPICommunicator.h
and libvtkParallelMPI-pv5.7.so
are available in their respective include/paraview-5.7 and lib64 directories, but can’t see what is missing for them to be found.
Scenario 2:
Re-using ParaView libraries for Catalyst applications. I’ve been following how trimmed Catalyst editions will be reworked for 5.8, but I’m content enough to use the full-blown ParaView sources for now (convenient, and expedient). For the build I’ve added an explicit -DPARAVIEW_ENABLE_CATALYST=ON
, -DVTK_MODULE_ENABLE_ParaView_Catalyst=YES
and -DVTK_MODULE_ENABLE_ParaView_PythonCatalyst=YES
flags during the build. The installation contains corresponding libvtkPVCatalyst-pv5.7.so.5.7
, libvtkPVPythonCatalyst-pv5.7.so.5.7
files, but I can’t see which other files it should require.
The initial discovery fails
find_package(ParaView REQUIRED COMPONENTS vtkPVPythonCatalyst)
So it appears that I need some different syntax here. The subsequent tests also fail:
try_compile(MYPROG_CATALYST_HAS_CWD
${CMAKE_CURRENT_BINARY_DIR} ${test_file}
LINK_LIBRARIES vtkPVPythonCatalyst
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${PARAVIEW_INCLUDE_DIRS}"
)
Scenario 3:
Building ParaView plugins for an existing installation. With the help of @Joachim_Pouderoux, we have the plugins restructured to use paraview_plugin_scan
and paraview_plugin_build
, but this seems to produce some very odd behaviour.
- The name of the plugin is used directly withour a
lib
prefix, which seem to prevent regular library loading. - The name of the plugin is created as an extra directory, which means that we then have installation into
lib/paraview-5.7/myPlugin/myPlugin.so
instead of simplylib/paraview-5.7/libmyPlugin.so
. - The intermediate library (for a client/server plugin) is either installed as a static, or a dynamic library - cannot seem to fully suppress its generation.
I hope this provides sufficient information.
Cheers,
/mark