[CMake] DESTDIR behaviour with different variable name

Tyler tyler at cryptio.net
Mon Apr 11 12:01:09 EDT 2011


On Mon, Apr 11, 2011 at 8:54 AM, Tomasz Grobelny
<tomasz at grobelny.oswiecenia.net> wrote:
> Ok, but is there a way to achieve the same effect so that the user can
> type just "make install" and not know anything about DESTDIR environment
> variable (provided he knows about MYDESTDIR)? Maybe it is possible to put
> this "DESTDIR=$MYDESTDIR" in the generated Makefiles somehow...

If I understand your use case right (which I might not as you haven't
described what you're trying to do, just how you're trying to do it),
maybe you can just override CMAKE_INSTALL_PREFIX.

If you go this route, check the archives because of the whole
_INITIALIZED_TO_DEFAULT aspect of that particular cache variable.

tyler


More information about the CMake mailing list