Resource linking ignores installation prefix
Created by: OPNA2608
Describe the bug https://github.com/OpenXRay/xray-16/blob/705d957fbbbb01cc5b86e83708917a5d17c4428e/src/xrCore/xrCore.cpp#L265-L287
This code ignores the user-configurable prefix for the build to which these file & directories actually get installed to.
We currently need to patch this in Nixpkgs to point to our build's prefix instead.
To Reproduce
- Pass
-DCMAKE_INSTALL_PREFIX=/some/path/that/isnt/the/default
to CMake - Build & install OpenXRay
- Launch OpenXRay in a way that would enter the mentioned block of code
The created symlinks should point to invalid (or at least for this particular build incorrect) paths.
Expected behavior
The code should use the prefix the user passed to CMake (e.g. /nix/store/v9s3qr21cf15lx3lgp1x4d4k8pdcc2an-openxray-822-december-preview
) instead of hardcoding /usr
.
Screenshots n/a
BugTrap error report n/a
Desktop (please complete the following information):
- OS: Ubuntu 18.04.5 (with Nixpkgs) & NixOS 20.09
- OpenXRay build version: 822
Additional context
I think CMAKE_INSTALL_FULL_DATAROOTDIR
is the CMake variable the fixed code should somehow get access to. CMAKE_INSTALL_DATAROOTDIR
works for moving files but it may be a relative path, while CMAKE_INSTALL_FULL_DATAROOTDIR
is guaranteed to be an absolute one.