[CMake] cmake and stow: differing installation and runtime locations

Michael Wild themiwi at gmail.com
Thu Sep 30 05:18:49 EDT 2010


On 30. Sep, 2010, at 11:11 , Christoph Groth wrote:

> Michael Wild <themiwi at gmail.com> writes:
> 
>> On 30. Sep, 2010, at 10:51 , Christoph Groth wrote:
>> 
>>> I was not able to find out how to specify different installation and
>>> runtime locations with cmake.
>> 
>> Why must your program know anything about the $HOME prefix? After all,
>> it's only symlinked there.
> 
> Some packages (e.g. ALPS http://alps.comp-phys.org/) write or even
> compile-in the installation path into some of the installed files, for
> the package to know where it is installed.
> 
> Christoph

Yes, and that installation path should be $HOME/stow/package-name. After all, that's where all the real files are. This way, you can even run the executables even if they are not currently symlinked.

If you can't live with that, use

cmake -DCMAKE_INSTALL_PREFIX=$HOME /path/to/source
make
make install DESTDIR=$HOME/stow/package-name

Michael

--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100930/5dc758b7/attachment.pgp>


More information about the CMake mailing list