Skip to content

[v638][cmake] Handle absolute install_dir in relative RPATH resolution#21792

Merged
guitargeek merged 1 commit intoroot-project:v6-38-00-patchesfrom
guitargeek:bp_1
Apr 4, 2026
Merged

[v638][cmake] Handle absolute install_dir in relative RPATH resolution#21792
guitargeek merged 1 commit intoroot-project:v6-38-00-patchesfrom
guitargeek:bp_1

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

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.

(cherry picked from commit e2df120)

`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.

(cherry picked from commit e2df120)
@guitargeek guitargeek self-assigned this Apr 4, 2026
@guitargeek guitargeek requested a review from bellenot as a code owner April 4, 2026 11:26
@guitargeek guitargeek changed the title [cmake] Handle absolute install_dir in relative RPATH resolution [v638][cmake] Handle absolute install_dir in relative RPATH resolution Apr 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Test Results

    19 files      19 suites   2d 21h 28m 47s ⏱️
 3 717 tests  3 717 ✅ 0 💤 0 ❌
68 884 runs  68 884 ✅ 0 💤 0 ❌

Results for commit ff72dcb.

@guitargeek guitargeek merged commit c5b5c48 into root-project:v6-38-00-patches Apr 4, 2026
29 checks passed
@guitargeek guitargeek deleted the bp_1 branch April 4, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant