[CMake] CPACK_SET_DESTDIR
Bill Hoffman
bill.hoffman at kitware.com
Tue Jul 22 09:47:02 EDT 2008
Mike Arthur wrote:
> What does CPACK_SET_DESTDIR actually do?
>
> I can't find it documented anywhere but it seems needed for some CPack
> generators.
>
> CPack seems great but it's very poorly documented compared to CMake, even when
> using the wiki.
>
By default CPack works by setting CMAKE_INSTALL_PREFIX to
_CPack/install or something close to that in the build tree. However,
if your project uses any absolute paths, this breaks. If you set
CPACK_SET_DESTDIR, then CPack will not change CMAKE_INSTALL_PREFIX, and
use make DESTDIR=_CPack/install. This will preserve the
CMAKE_INSTALL_PREFIX for the project and work with absolute install
paths (like /etc/foobar.config).
-Bill
More information about the CMake
mailing list