COMP: Fix configuration of client projects adding OpenVR_* to CACHE in iMSTKConfig
Add variables OpenVR_INCLUDE_DIR and OpenVR_LIBRARY to the CACHE to workaround issue related to use of mark_as_advanced command in FindOpenVR and described in CMP0102. Indeed, this is required because CMP0102 is not automatically set to NEW and addressing this issue would required to update the FindOpenVR modules shipped in the different VTK version iMSTK can be built against. See https://cmake.org/cmake/help/latest/policy/CMP0102.html This commit fixes the following error reported when attempting to configure a project like iMSTKProject (see [1]) against an iMSTK build tree: CMake Error at /path/to/cmake-3.21.4-linux-x86_64/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenVR (missing: OpenVR_LIBRARY OpenVR_INCLUDE_DIR) Call Stack (most recent call first): /path/to/cmake-3.21.4-linux-x86_64/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /path/to/iMSTK-build/install/lib/cmake/vtk-9.0/FindOpenVR.cmake:45 (find_package_handle_standard_args) /path/to/iMSTK-build/install/lib/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:162 (find_package) /path/to/iMSTK-build/install/lib/cmake/vtk-9.0/vtk-config.cmake:131 (include) /path/to/cmake-3.21.4-linux-x86_64/share/cmake-3.21/Modules/CMakeFindDependencyMacro.cmake:47 (find_package) /path/to/iMSTK-build/Innerbuild/iMSTKConfig.cmake:150 (find_dependency) CMakeLists.txt:8 (find_package) [1] https://gitlab.kitware.com/iMSTK/imstkexternalprojecttemplate/-/tree/master/iMSTKProject
Loading
Please register or sign in to comment