You need a CPackOptions file (CPACK_PROJECT_CONFIG_FILE) that gets loaded at CPack time.....<br><br>In CMake, ours has this at the bottom of it:<br><br>if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")<br>
if(CMAKE_PACKAGE_QTGUI) <br> set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications")<br> else(CMAKE_PACKAGE_QTGUI) <br> set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")<br>
endif(CMAKE_PACKAGE_QTGUI) <br>endif("${CPACK_GENERATOR}" STREQUAL "PackageMaker")<br><br>To use one, set one up (either hand written or configured), something like this:<br> CONFIGURE_FILE("${CMake_SOURCE_DIR}/<a href="http://CMakeCPackOptions.cmake.in">CMakeCPackOptions.cmake.in</a>"<br>
"${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)<br> SET(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")<br><br><br>See CMake's "CMakeCPack.cmake" and "<a href="http://CMakeCPackOptions.cmake.in">CMakeCPackOptions.cmake.in</a>" files in the top level directory for more CPack magic than you'll be able to absorb on a Friday afternoon.... :-)<br>
<br><br>HTH,<br>David<br><br><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 4:45 PM, Chris Wolf <span dir="ltr"><<a href="mailto:cw10025@gmail.com">cw10025@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Earlier, I identified a problem with the "PackageMaker" (Apple) packager,<br>
and now, I see the same exact problem with the "DEB" (Debian)<br>
packager - it keeps prefixing "./usr" to all the paths.<br>
<br>
Changing CPACK_PACKAGING_INSTALL_PREFIX doesn't do anything<br>
(even when it's at the top of the file)<br>
<br>
This problem does not occur with packagers of type "DragNDrop",<br>
"TGZ" and "TBZ2" - these are Ok.<br>
<br>
Any help would be great, thanks...<br>
<br>
-Chris<br>
<br>
> Another observation regarding the CPack-generated *.pkg<br>
> >> (wrapped in a *.dmg) :<br>
> >><br>
> >> The path is prefixed by "./usr", somehow:<br>
> >><br>
> >> (assuming the *.dmg is already mounted)<br>
> >> $ cd ./libusb-0.1.1-Darwin.pkg/Contents<br>
> >> $ lsbom -s Archive.bom<br>
> >> .<br>
> >> ./usr<br>
> >> ./usr/lib<br>
> >> ./usr/lib/libusb.dylib<br>
> >><br>
> >> So where does the "./usr/" prefix come from?<br>
><br>
> I'm do not know the dmg CPack Generator<br>
> (is it PackageMaker or DragNDrop?)<br>
> and I'm not a mac user but each CPack generator has a default<br>
> "builtin" CPACK_PACKAGING_INSTALL_PREFIX.<br>
><br>
> Try<br>
> set(CPACK_PACKAGING_INSTALL_PREFIX. "/whatever")<br>
><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><br>
</blockquote></div><br>