Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeLists.txt: use CMAKE_INSTALL_FULL_* directories to be friendlier to distributions #1084

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Sep 17, 2023

No description provided.

@trofi trofi mentioned this pull request Sep 17, 2023
12 tasks
@eustas
Copy link
Collaborator

eustas commented Sep 21, 2023

Awesome. Thanks.

@eustas
Copy link
Collaborator

eustas commented Sep 21, 2023

Please, rebase

Without the change on systems where `CMAKE_INSTALL_LIBDIR` is an
absolute path outside `CMAKE_INSTALL_PREFIX` (like `nixpkgs`) libraries
ended up embedding wrong RPATH and libraries failed to load.

The change uses suggestion from https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
to use `CMAKE_INSTALL_FULL_LIBDIR` (similar to library install code)
to enbed it as an RPATH.
Without the change install just fails for me as `SHARE_INSTALL_PREFIX`
is unset for me.

Following https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
I'm using absolute path expansion to install mans.
@trofi
Copy link
Contributor Author

trofi commented Sep 21, 2023

Rebased.

eustas
eustas previously approved these changes Sep 21, 2023
@copybara-service copybara-service bot merged commit 421be80 into google:master Dec 8, 2023
36 of 41 checks passed
@trofi trofi deleted the brotli-cmake-tweaks branch December 8, 2023 19:18
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.

2 participants