[CMake] The project files that CMake generates can't be moved

Bill Hoffman bill.hoffman at kitware.com
Fri Oct 30 13:59:12 EDT 2015


On 10/30/2015 1:48 PM, Attila Krasznahorkay wrote:
> I'm a bit surprised about this answer.
>
> Sure, build areas are not to be moved around. I completely agree. But
> this is why we have the concept of installing releases. As long as
> you configure your build correctly, you should be able to move around
> your install directory. As the binaries by default will not have
> absolute paths in them after installation. At least not to
> "themselves".
>
> (I am myself working these days on how to install larger projects
> such that after installation, after moving the installed directories
> around, including the directories that the build was done against,
> the code would still work. It's not trivial to do, but it's not
> impossible either. One just has to use $<INSTALL_INTERFACE:...> in a
> clever way...)
>
> Cheers,

Install trees should be relocatable (that is how cpack works).  However, 
build trees are not.

-Bill


More information about the CMake mailing list