I am working on a project which takes considerable time to build (10-15) minutes. I have recompiled to verify if there is a compilation error. Now I want to change the install directory so that I have a new version of executable with the new changes. Is there a method to just modify the install path so that the 'make install' installs to a new location rather than the old one?
|
CMake generated makefiles support the DESTDIR coding convention for makefiles. Thus you can override the default installation location by setting the
There is no need to re-run CMake. |
|||
|
Running CMake with |
|||||||||
|
Just in case if someone is not using CMake then there is a method to do that in Makefile. If you have Makefile.config file generated in your build directory, find the |
|||
|
The canonical definition of DESTDIR and prefix is: the files are installed to $DESTDIR$prefix, but prepared as if their final install location was just $prefix. So DESTDIR is only for people building packages or tarballs of binaries; CMAKE_INSTALL_PREFIX is for anyone who wants to specify where the built binaries should live in the end. |
|||
|
I don't know whether this is generally true, but I can give an example of an application for which the accepted answer by
[...]
On the other hand, following this answer by
[...]
|
|||
|