Sandro Santilli <s...@kbt.io> writes:

> On Wed, Oct 13, 2021 at 03:41:30PM -0700, Paul Ramsey wrote:
>> Actually searching for "RPATH" here turns up all kinds of knobs if you want 
>> different things done to rpath
>> 
>> https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html
>
> Greg might be after this:
> https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_RPATH.html

That looks close.   What I need (in general) is to be able to specify:

  RPATH value to be added to BUILD and INSTALL, so that dependency
  libraries can be found, both at runtime and at test time.

  RPATH value to be added to INSTALL so that geos can find its own libs

and these would both be ${RPREFIX}/lib.


It seems that for cmake to get the ordering of RPATHs right, which it
currently isn't, it's likely necessary to avoid putting anything that is
rpath in a linker flag of any kind, and to only use the CMAKE_*_RPATH
variables.


So I think that means settting

 CMAKE_BUILD_RPATH=/usr/pkg/lib
 CMAKE_INSTALL_RPATH=/usr/pkg/lib

both, in the general case for calling cmake.   For geos where pthread is
from pkgsrc, this is the actual case.  For geos when there aren't any
dependencies, the BUILD could be skipped as a special case.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to