Skip to content

VTK::libxml2 installs configured headers.

David Allemang requested to merge david.allemang/vtk:libxml2-headers into master

Configured xmlversion.h.in and win32xmlversion.h.in were not installed correctly following b318c31d; this change explicitly installs those headers in the VTK module CMakeLists.


To reproduce the issue:

  • Build and install VTK with VTK_MODULE_ENABLE_LIBXML2=YES.
  • Observe that xmlversion.h is missing from $INSTALL/include/vtk-9.1/vtklibxml2/include/libxml/.
  • Note that it is present at $BUILD/ThirdParty/libxml2/vtklibxml2/include/libxml/.

I have a superbuild project which builds VTK, and any attempt to #include "vtk_libxml2.h" from that project fails on this line


I believe the issue arose because these configured headers are not detected by vtk_module_third_party or vtk_detect_library_shared since their output resides in the build tree, not the source tree. See how their install rules are now masked in /libxml2/vtklibxml2/CMakeLists.txt#L773-783

I am relatively unfamiliar with the VTK modules idioms; it might be more appropriate to add these install rules in another location. Adding those rules here fixes my superbuild project, but do let me know if those rules should be declared elsewhere.

Edited by David Allemang

Merge request reports

Loading