pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Pointing cmake to libraries



On Thu, Jul 21, 2022 at 9:00 AM Greg Troxel <gdt%lexort.com@localhost> wrote:
>
> Niclas Rosenvik <nros%netbsd.org@localhost> writes:
>
> > CMake has rpath writing turned off using -DCMAKE_SKIP_RPATH:BOOL=ON
> > in pkgsrc.
>
> Do you know why?   It seems that cmake rpath stuff is messy, and I don't
> understand why we avoid the native handling, unless it's bl3/wrappers,
> but still autoconf/libtool operates in that world.

Cmake has two rpaths: CMAKE_BUILD_RPATH and CMAKE_INSTALL_RPATH.
Because some packages need to run executables inside the work
directory while building, so CMAKE_BUILD_RPATH theoretically lets you
do that without the old LD_LIBRARY_PATH trick.

I *think* this should work for most packages:

CMAKE_ARGS+=    -DCMAKE_BUILD_RPATH="${BUILDLINK_DIR}"
CMAKE_ARGS+=    -DCMAKE_INSTALL_RPATH="${PREFIX}"


Home | Main Index | Thread Index | Old Index