Skip to content

VTKmConfig.cmake.in needs path canonicalization before comparisions

In general, install paths in CMake may be either absolute or relative to CMAKE_INSTALL_PREFIX.

In case an absolute path is used for VTKm_INSTALL_CONFIG_DIR, concatenating with an / will create a string with double //. Even if this is semantically the same as CMAKE_CURRENT_LIST_DIR, the strings differ.

https://gitlab.kitware.com/vtk/vtk-m/-/blob/master/CMake/VTKmConfig.cmake.in#L83

There are several more occasions where path comparision uses a plain STREQUAL. All possibly non-canonical paths should be normalized with get_filename_component(... REALPATH).