Commit e2df120
committed
[cmake] Handle absolute install_dir in relative RPATH resolution
`ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH` assumed that `install_dir` is
always relative to `CMAKE_INSTALL_PREFIX` when computing the relative
path to `CMAKE_INSTALL_FULL_LIBDIR`. However, some build environments
(e.g. Fedora or Nix) pass an absolute `CMAKE_INSTALL_LIBDIR`, which
results in an incorrect relative path.
Fix this by detecting whether `install_dir` is absolute and using it
directly as the base directory when computing the relative path.1 parent 01aeb02 commit e2df120
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2266 | 2266 | | |
2267 | 2267 | | |
2268 | 2268 | | |
2269 | | - | |
| 2269 | + | |
| 2270 | + | |
2270 | 2271 | | |
2271 | 2272 | | |
2272 | | - | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
2273 | 2282 | | |
2274 | 2283 | | |
2275 | 2284 | | |
| |||
0 commit comments