Well known issue for quite some time now.<div><br></div><div>See the quite extensive notes in this bug:</div><div><a href="http://public.kitware.com/Bug/view.php?id=7000">http://public.kitware.com/Bug/view.php?id=7000</a></div>
<div><br></div><div>You can set <span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">CPACK_SET_DESTDIR to ON </span>in your CMakeLists.txt file to get this to work with the RPM CPack generator.</div>
<div><br><div class="gmail_quote">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....</div>
<div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">HTH,</div><div class="gmail_quote">David</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">
On Wed, Jun 23, 2010 at 10:09 AM, Magnus Therning <span dir="ltr"><<a href="mailto:magnus@therning.org">magnus@therning.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The documentation for install() is clear, an absolute path (e.g.<br>
'/usr/lib') is used directly and relative path (e.g. 'lib') is<br>
prefixed by CMAKE_INSTALL_PREFIX. Another thing to note is that 'make<br>
DESTDIR=foo install' *always* works as expected!<br>
<br>
However, the relation between install() and CPack is unclear<br>
<br>
- For some files I accidentally had an absolute install path, and<br>
during 'make package' these files got installed in the file system and<br>
they were left out of the RPM. I naively assumed that the RPM builder<br>
would use DESTDIR to control where things end up, but I must be wrong.<br>
Is this a bug?<br>
<br>
- The variable CMAKE_INSTALL_PREFIX is not used at all during RPM<br>
building. CMAKE_INSTALL_PREFIX is /usr/local, but files get put into<br>
/usr in the RPM. Is this a bug?<br>
<br>
/M<br>
<br>
--<br>
Magnus Therning (OpenPGP: 0xAB4DFBA4)<br>
magnus@therning.org Jabber: magnus@therning.org<br>
<a href="http://therning.org/magnus" target="_blank">http://therning.org/magnus</a> <a href="http://identi.ca" target="_blank">identi.ca</a>|twitter: magthe<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a></blockquote></div><br></div>