mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-22 06:15:42 +08:00

Cmake accepts both absolute and relative paths in CMAKE_INSTALL_DATADIR. For the latter case CMAKE_INSTALL_PREFIX is being prepended automatically. %{rel_datadir} is derived from CMAKE_INSTALL_DATADIR which was assumed to be relative and otherwise causes issues in a .pc file where prefix is being prepended unconditionally. Make sure %{rel_datadir} is relative by calculating RELATIVE_PATH from CMAKE_INSTALL_PREFIX to CMAKE_INSTALL_FULL_DATADIR which is known to be absolute. Fixes #8150