cmake init template aren't setting CMAKE_INSTALL_RPATH #86
Replies: 1 comment
-
This sort of thing doesn't belong in project code and thus is not in the template. I do not and cannot know the requirements of the users, and I shall not assume such things. One could define the cache variables in a way that Setting up the rpath and essentially the software distribution method of a project is when this variable should be decided on a case by case basis. Hardcoding this variable as such would be horribly wrong, as now you would tie package managers' (the people) hands and force them to patch your project and essentially maintain a fork unnecessarily. See the other talks referenced in the readme. I will not add anything to the template that forces people to patch around code and maintain forks just to package a project. |
Beta Was this translation helpful? Give feedback.
-
I just watch the deep dive cmake video which link is on the README of this project. https://www.youtube.com/watch?v=m0DwB4OvDXk
In the video at about 49 mins, he explains that without setting RPATH in the library, a library may results in an runtime loading error on linux as it cannot find its own external dependencies.
The solution is to do
before add_library(), yet, I do not see this happening when I create a library template using cmake-init, is it because newer CMake offers a different way to fix that?
Beta Was this translation helpful? Give feedback.
All reactions