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

Respect CMake install paths #9444

Closed
wants to merge 1 commit into from

Conversation

aperechnev
Copy link

@aperechnev aperechnev commented Aug 19, 2024

There are a lot of CMakeLists.txt files with absolute installation paths like:

install(TARGETS wallet_rpc_server DESTINATION bin)

where bin usually points to /usr/local/bin.

It works well, but if some build system attempts to produce a package, it will fail since a user might not have root privileges. Such build systems usually place artifacts in a dedicated directory, like ~/my-package/usr/local/bin/. As an example, FreeBSD's Makefile and Poudriere always fail during the insufficient access rights. I believe this is not the only case.

So I just changed the install paths to respect CMake prefixes according to CMake documentation:

install(TARGETS wallet_rpc_server DESTINATION ${CMAKE_INSTALL_BINDIR})

And now the produced executables and libraries can be placed to the right directory.

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