9.0RC2 VTK forces libraries using it to specify OpenVR settings again
When I enable the VTK OpenVR module in 9.0RC2, and set all OpenVR settings accordingly (OpenVR_INCLUDE_DIR, OpenVR_LIBRARY), then any library/program referencing this VTK build also requires (OpenVR_INCLUDE_DIR, OpenVR_LIBRARY) to be set. Otherwise an error is reported during CMake configuration (e.g. from ITK build):
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find OpenVR (missing: OpenVR_LIBRARY OpenVR_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
C:/builds/vtk/bin-9rc2/lib/cmake/vtk-9.0/FindOpenVR.cmake:45 (find_package_handle_standard_args)
C:/builds/vtk/bin-9rc2/lib/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:250 (find_package)
C:/builds/vtk/bin-9rc2/lib/cmake/vtk-9.0/vtk-config.cmake:129 (include)
C:/builds/vtk/bin-9rc2/vtk-config.cmake:1 (include)
C:/builds/itk/bin-5.1rc2/lib/cmake/ITK-5.1/Modules/ITKVtkGlue.cmake:30 (find_package)
This was not the case for previous VTK versions (e.g. 8.2).
Is this as intended, and if so, why? Other libraries used by VTK also aren't required to be set again in derived builds (e.g. Qt).
Edited by Bernhard Fröhler