Hi Richard, Thanks for the details, think I got it now.
Reading the docs for Cmake, it appears, DESTDIR can only be using on *Nix based platforms (I've not tested Windows yet), but, I was able to set / pass DESTDIR during the build. I ran a few tests. I had to use Unix Makefiles in order to pass DESTDIR variable. There may be ways to do it when calling cmake directly (cmake --build . --target install .. .. ), I've just not figured it out yet. The default prefix w/out passing CMAKE_INSTALL_PREFIX during the build tree configuration is /usr/local. So if I wanted the install prefix to be DESTDIR + /usr, I had to set -D CMAKE_INSTALL_PREFIX="/usr". Everything else seemed to work OK. 73's Greg, KI7MT On 11/27/2015 10:19 AM, Richard Shaw wrote: > 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 > -- ---------------------------------------------------------------- Launchpad....: https://launchpad.net/~ki7mt Ubuntu Hams..: https://launchpad.net/~ubuntu-hams-devel Debian Hams..: https://alioth.debian.org/projects/pkg-hamradio/ JTSDK........: https://sourceforge.net/projects/jtsdk/ OpenPGP......: C177 6630 7115 78FE 9A2B 9F7F 18C0 F6B7 0DA2 F991 ------------------------------------------------------------------------------ _______________________________________________ wsjt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wsjt-devel
