Skip to content

cmake: Specify relative RPATH for install-time prefixes#280

Merged
mattalvarado merged 1 commit intomasterfrom
ethanmusser/279-relocatable-installs-with-install-time-prefix
Apr 27, 2026
Merged

cmake: Specify relative RPATH for install-time prefixes#280
mattalvarado merged 1 commit intomasterfrom
ethanmusser/279-relocatable-installs-with-install-time-prefix

Conversation

@ethanmusser
Copy link
Copy Markdown
Contributor

@ethanmusser ethanmusser commented Apr 27, 2026

Replace the configure-time ${CMAKE_INSTALL_PREFIX}/lib install RPATH with paths relative to each installed artifact, so the installed tree is relocatable and works whether the prefix is provided at configure time (-DCMAKE_INSTALL_PREFIX=...) or at install time (cmake --install <build-dir> --prefix <dir>).

Fixes #279.

Testing

I have only tested this on a Linux system. This leaves the Apple path untested. The Windows/other path is just the previous behavior.

@ethanmusser ethanmusser self-assigned this Apr 27, 2026
@ethanmusser ethanmusser added the bug Something isn't working label Apr 27, 2026
@mattalvarado mattalvarado merged commit 14fc7dd into master Apr 27, 2026
7 checks passed
@mattalvarado mattalvarado deleted the ethanmusser/279-relocatable-installs-with-install-time-prefix branch April 27, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install RPATH is always /usr/local/lib with install-time prefix

2 participants