Thomas Klausner <wiz%NetBSD.org@localhost> writes: > For a project I maintain using cmake, I have the following in my CMakeLists.txt: > > if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) > set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) > set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) > endif() > > The if() clause could probably be improved, but it does not break on > at least Linux, macOS, NetBSD, and Windows. That is a useful workaround, but It's not really about Linux vs !Linux, as pkgsrc on linux needs RPATH. I don't know if CMAKE_INSTALL_RPATH_USE_LINK_PATH is right because if a package uses ../../lib/foo.so it would seem to add that path. I can see individual projects adding this, but we need pkgsrc to cope with the cmake things that are out there. (idea to follow)
Attachment:
signature.asc
Description: PGP signature