[CMake] CPack (RPM) and install()

David Cole david.cole at kitware.com
Wed Jun 23 10:38:02 EDT 2010


Well known issue for quite some time now.

See the quite extensive notes in this bug:
http://public.kitware.com/Bug/view.php?id=7000

You can set CPACK_SET_DESTDIR to ON in your CMakeLists.txt file to get this
to work with the RPM CPack generator.

It would be fabulous if there were a way to fix this once and for all to
everyone's satisfaction. However, it's tricky, because there are many
different variables involved: the interactions among which are not always
immediately obvious. If somebody has a brilliant patch that can fix that
issue without breaking existing projects' use cases of CPack, feel free to
attach it to the bug and let me know....


HTH,
David


On Wed, Jun 23, 2010 at 10:09 AM, Magnus Therning <magnus at therning.org>wrote:

> The documentation for install() is clear, an absolute path (e.g.
> '/usr/lib') is used directly and relative path (e.g. 'lib') is
> prefixed by CMAKE_INSTALL_PREFIX.  Another thing to note is that 'make
> DESTDIR=foo install' *always* works as expected!
>
> However, the relation between install() and CPack is unclear
>
> - For some files I accidentally had an absolute install path, and
> during 'make package' these files got installed in the file system and
> they were left out of the RPM.  I naively assumed that the RPM builder
> would use DESTDIR to control where things end up, but I must be wrong.
>  Is this a bug?
>
> - The variable CMAKE_INSTALL_PREFIX is not used at all during RPM
> building.  CMAKE_INSTALL_PREFIX is /usr/local, but files get put into
> /usr in the RPM.  Is this a bug?
>
> /M
>
> --
> Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
> magnus@therning.org          Jabber: magnus@therning.org
> http://therning.org/magnus         identi.ca|twitter: magthe
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100623/1e4a0e59/attachment-0001.htm>


More information about the CMake mailing list