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(&quot;${CPACK_GENERATOR}&quot; STREQUAL &quot;PackageMaker&quot;)<br>
  if(CMAKE_PACKAGE_QTGUI)                       <br>    set(CPACK_PACKAGE_DEFAULT_LOCATION &quot;/Applications&quot;)<br>  else(CMAKE_PACKAGE_QTGUI)                     <br>    set(CPACK_PACKAGE_DEFAULT_LOCATION &quot;/usr&quot;)<br>
  endif(CMAKE_PACKAGE_QTGUI)                    <br>endif(&quot;${CPACK_GENERATOR}&quot; STREQUAL &quot;PackageMaker&quot;)<br><br>To use one, set one up (either hand written or configured), something like this:<br>  CONFIGURE_FILE(&quot;${CMake_SOURCE_DIR}/<a href="http://CMakeCPackOptions.cmake.in">CMakeCPackOptions.cmake.in</a>&quot;<br>
    &quot;${CMake_BINARY_DIR}/CMakeCPackOptions.cmake&quot; @ONLY)<br>  SET(CPACK_PROJECT_CONFIG_FILE &quot;${CMake_BINARY_DIR}/CMakeCPackOptions.cmake&quot;)<br><br><br>See CMake&#39;s &quot;CMakeCPack.cmake&quot; and &quot;<a href="http://CMakeCPackOptions.cmake.in">CMakeCPackOptions.cmake.in</a>&quot; files in the top level directory for more CPack magic than you&#39;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">&lt;<a href="mailto:cw10025@gmail.com">cw10025@gmail.com</a>&gt;</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 &quot;PackageMaker&quot; (Apple) packager,<br>
and now, I see the same exact problem with the &quot;DEB&quot; (Debian)<br>
packager - it keeps prefixing &quot;./usr&quot; to all the paths.<br>
<br>
Changing CPACK_PACKAGING_INSTALL_PREFIX doesn&#39;t do anything<br>
(even when it&#39;s at the top of the file)<br>
<br>
This problem does not occur with packagers of type &quot;DragNDrop&quot;,<br>
&quot;TGZ&quot; and &quot;TBZ2&quot; - these are Ok.<br>
<br>
Any help would be great, thanks...<br>
<br>
  -Chris<br>
<br>
&gt; Another observation regarding the CPack-generated *.pkg<br>
&gt; &gt;&gt; (wrapped in a *.dmg) :<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The path is prefixed by &quot;./usr&quot;, somehow:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; (assuming the *.dmg is already mounted)<br>
&gt; &gt;&gt; $ cd ./libusb-0.1.1-Darwin.pkg/Contents<br>
&gt; &gt;&gt; $ lsbom -s Archive.bom<br>
&gt; &gt;&gt; .<br>
&gt; &gt;&gt; ./usr<br>
&gt; &gt;&gt; ./usr/lib<br>
&gt; &gt;&gt; ./usr/lib/libusb.dylib<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; So where does the &quot;./usr/&quot; prefix come from?<br>
&gt;<br>
&gt; I&#39;m do not know the dmg CPack Generator<br>
&gt; (is it PackageMaker or DragNDrop?)<br>
&gt;  and I&#39;m not a mac user but each CPack generator has a default<br>
&gt; &quot;builtin&quot; CPACK_PACKAGING_INSTALL_PREFIX.<br>
&gt;<br>
&gt; Try<br>
&gt; set(CPACK_PACKAGING_INSTALL_PREFIX. &quot;/whatever&quot;)<br>
&gt;<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>