On Fri, Nov 27, 2015 at 10:33 AM, Greg Beam <[email protected]> wrote:

> Hi Richard,
>
>  From what I've read, and I may be way off on this, DESTDIR has no
> bearing on CMAKE_INSTALL_PREFIX or RPATH, for example:
>
> If I set:
>
> CMAKE_INSTALL_PREFIX=/home/ki7mt/wsjtx
>
> and prefix it with DESTDIR=/tmp/example1
>
> I'd end up with an install located at:
>
> /tmp/example1/home/ki7mt/wsjtx
>
> Maybe I'm confused on DESTDIR usage or something, but I thought it was
> the same as autotools.


Without getting too detailed, it has the same apparent effect for this
particular situation and for private builds you'll probably be fine.

Trying to think of a minimal example of the difference. Let's say you have
a private library. It's not installed into /usr/lib because that's where
public libraries go so it might go into a subdirectory, /usr/lib/private,
which is (intentonally) not in the LD path so any binaries that use it will
need the RPATH set.

If you build using CMAKE_INSTALL_PREFIX only, the RPATH of the binary would
be set to the build path, something like
/home/ki7mt/<project>/usr/lib/private... Which is fine if you're going to
run it from your home directory, but if the intent is for a system wide
install into /usr/lib... then the RPATH would be wrong and the binary would
not be able to find the library.

Using DESTDIR and CMAKE_INSTALL_PREFIX, DESTDIR would be
/home/ki7mt/<project> and CMAKE_INSTALL_PREFIX would be /usr/lib/private.

Once system wide install is done, the binary would correctly find the
library in /usr/lib/private.

Hope that makes more sense.

Richard
KF5OIM
------------------------------------------------------------------------------
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to