Python wrapping needs to pull in all wrapped targets in static builds
So I am trying to build PV 5.12 with external VTK (!6375 (merged)) statically and ran into (after removing a cycle in the target deps):
CMake Error at E:/vcpkg_folders/paraview/installed/x64-windows-static-md-release/share/vtk/VTK-targets.cmake:967 (set_target_properties):
The link interface of target "VTK::RenderingOpenVR" contains:
OpenVR::OpenVR
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Call Stack (most recent call first):
E:/vcpkg_folders/paraview/installed/x64-windows-static-md-release/share/vtk/vtk-config.cmake:143 (include)
E:/vcpkg_folders/paraview/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
CMakeLists.txt:65 (find_package)
CMake Error at E:/vcpkg_folders/paraview/installed/x64-windows-static-md-release/share/vtk/VTK-targets.cmake:1265 (set_target_properties):
The link interface of target "VTK::pegtl" contains:
PEGTL::PEGTL
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Call Stack (most recent call first):
E:/vcpkg_folders/paraview/installed/x64-windows-static-md-release/share/vtk/vtk-config.cmake:143 (include)
E:/vcpkg_folders/paraview/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
CMakeLists.txt:65 (find_package)
CMake Error at E:/vcpkg_folders/paraview/installed/x64-windows-static-md-release/share/vtk/VTK-targets.cmake:1584 (set_target_properties):
The link interface of target "VTK::IOGDAL" contains:
GDAL::GDAL
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Call Stack (most recent call first):
E:/vcpkg_folders/paraview/installed/x64-windows-static-md-release/share/vtk/vtk-config.cmake:143 (include)
E:/vcpkg_folders/paraview/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
CMakeLists.txt:65 (find_package)
The target chain is:
OpenVR::OpenVR
-> VTK::RenderingOpenVR
-> VTK::vtkRenderingOpenVRPython
-> VTK::vtkpythonmodules
-> ParaView::PythonInitializer or pvincubatorpythonmodules or pvpythonmodules
(similar for GDAL)
The problem is that the find_package
call added for external VTK is not pulling in the required VTK COMPONENTS which have been wrapped.
The calculated find_package call is:
find_package(VTK CONFIG REQUIRED COMPONENTS CommonCore;CommonDataModel;IOImage;IOParallelXML;ParallelMPI;RenderingCore;RenderingOpenGL2;CommonExecutionModel;PythonInterpreter;ParallelCore;WrappingPythonCore;FiltersGeneral;FiltersHybrid;vtksys;mpi;RenderingParallelLIC;Python;RenderingMatplotlib;AcceleratorsVTKmFilters;IOXdmf2;IOCGNSReader;DomainsChemistry;FiltersAMR;FiltersCore;FiltersExtraction;FiltersFlowPaths;FiltersGeneric;FiltersGeometry;FiltersHyperTree;FiltersModeling;FiltersOpenTURNS;FiltersParallel;FiltersParallelDIY2;FiltersParallelVerdict;FiltersSources;FiltersStatistics;FiltersTensor;FiltersTexture;FiltersVerdict;ImagingCore;ImagingFourier;ImagingGeneral;ImagingHybrid;ImagingSources;IOAsynchronous;IOChemistry;IOGeometry;IOInfovis;IOLegacy;IOParallel;IOPLY;IOVPIC;IOXML;IOAMR;IOCityGML;IOCONVERGECFD;IOFDS;IOIOSS;IOH5part;IOH5Rage;IONetCDF;IOOggTheora;IOOMF;IOParallelExodus;IOParallelLSDyna;IOPIO;IOHDF;IOSegY;IOTRUCHAS;IOVeraOut;IOTecplotTable;IOFLUENTCFF;RenderingFreeType;ParallelMPI4Py;FiltersParallelFlowPaths;FiltersParallelGeometry;FiltersParallelMPI;IOMPIImage;IOParallelNetCDF;WrappingTools;CommonMisc;CommonSystem;CommonTransforms;hdf5;netcdf;zlib;CommonMath;opengl;FiltersPython;FiltersPoints;IOCore;cgns;IOEnSight;FiltersParallelStatistics;FiltersProgrammable;GUISupportQt;IOExportGL2PS;jsoncpp;nlohmannjson;ChartsCore;pugixml;cli11;TestingRendering;IOImport;FiltersGeometryPreview;IOMovie;CommonComputationalGeometry;IOExport;fmt;RenderingAnnotation;RenderingContext2D;RenderingCellGrid;RenderingParallel;ViewsContext2D;ViewsCore;CommonColor;DomainsChemistryOpenGL2;FiltersCellGrid;InteractionStyle;RenderingContextOpenGL2;RenderingLICOpenGL2;RenderingLabel;RenderingVolumeAMR;lz4;RenderingVolume;FiltersImaging;doubleconversion;loguru )
And does not contain the required COMPONENTS to activate the lookup of the additional dependencies.
CC @ben.boeckel