[CMake] cmake end user vs. developer rpath handling

Aaron Cohen aaron at assonance.org
Wed Oct 9 12:55:45 EDT 2019


Is it not feasible to just let the build system do whatever it is going to
and use "chrpath" or "patchelf" to change the rpath after-the-fact?

On Wed, Oct 9, 2019 at 11:48 AM DIXON, MARK C. <mark.c.dixon at durham.ac.uk>
wrote:

> On Wed, 9 Oct 2019, Craig Scott wrote:
> ...
> >>> Is there a way to reliably add to, or at least override, the
> developer's
> >>> rpath in any cmake-built software?
> >>
> >> Short of editing the build system scripts? I doubt...
> >
> > The CMAKE_INSTALL_RPATH variable is used to initialise the INSTALL_RPATH
> > property of a target when that target is created. If you are pulling in
> > these other projects via add_subdirectory() rather than building them
> > standalone, you could modify the INSTALL_RPATH property of the targets
> you
> > want to change from within your own top level project after
> > add_subdirectory() returns.
> ...
>
> Thanks for this. My knowledge of cmake is pretty poor - I assume it uses
> the same definition of target as make. So you're saying I'd need to know
> the project's interesting targets first.
>
> My choices are: maintain a patch to the software's build system files or
> maintain a patch to encaspulate the software's build system files and
> drive with a config file. Right?
>
> Thanks,
>
> Mark
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191009/9ee54713/attachment.html>


More information about the CMake mailing list