[geos-devel] cmake detailed comments
Greg Troxel
gdt at lexort.com
Thu Oct 14 07:43:20 PDT 2021
Sandro Santilli <strk at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20211014/bb6a83b2/attachment.sig>
More information about the geos-devel
mailing list