<br><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 5:49 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;">
I&#39;m still unclear what you&#39;re suggesting here (quote, below).  If<br>
I run &quot;make package&quot;, doesn&#39;t that make target invoke cpack with the<br>
cmake-generated cpack options file (CPackConfig.cmake)?<br>
<br>
...and isn&#39;t &quot;cpack --config CPackConfig.cmake&quot; equivalent?<br>
<br>
Also, nowhere in the ./share/cmake-2.8.2/Modules directory do a see<br>
files named &quot;CMakeCPack.cmake&quot; and &quot;<a href="http://CMakeCPackOptions.cmake.in" target="_blank">CMakeCPackOptions.cmake.in</a>&quot;, that<br>
you refer me to.<br>
<br>
Could you be suggesting I download the source code of cmake and dig through<br>
that?<br></blockquote><div><br>Yes. Those files are used to prepare the packaging of CMake itself, and it is a great example of the stuff you gotta do to have a packager that works everywhere.<br><br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im"><br>
Thanks,<br>
<br>
  -Chris<br>
<br>
<br>
On 8/6/10 4:52 PM, David Cole wrote:<br>
</div><div><div></div><div class="h5">&gt; You need a CPackOptions file (CPACK_PROJECT_CONFIG_FILE) that gets loaded at<br>
&gt; CPack time.....<br>
&gt;<br>
&gt; In CMake, ours has this at the bottom of it:<br>
&gt;<br>
&gt; if(&quot;${CPACK_GENERATOR}&quot; STREQUAL &quot;PackageMaker&quot;)<br>
&gt;   if(CMAKE_PACKAGE_QTGUI)<br>
&gt;     set(CPACK_PACKAGE_DEFAULT_LOCATION &quot;/Applications&quot;)<br>
&gt;   else(CMAKE_PACKAGE_QTGUI)<br>
&gt;     set(CPACK_PACKAGE_DEFAULT_LOCATION &quot;/usr&quot;)<br>
&gt;   endif(CMAKE_PACKAGE_QTGUI)<br>
&gt; endif(&quot;${CPACK_GENERATOR}&quot; STREQUAL &quot;PackageMaker&quot;)<br>
&gt;<br>
&gt; To use one, set one up (either hand written or configured), something like<br>
&gt; this:<br>
&gt;   CONFIGURE_FILE(&quot;${CMake_SOURCE_DIR}/<a href="http://CMakeCPackOptions.cmake.in" target="_blank">CMakeCPackOptions.cmake.in</a>&quot;<br>
&gt;     &quot;${CMake_BINARY_DIR}/CMakeCPackOptions.cmake&quot; @ONLY)<br>
&gt;   SET(CPACK_PROJECT_CONFIG_FILE<br>
&gt; &quot;${CMake_BINARY_DIR}/CMakeCPackOptions.cmake&quot;)<br>
&gt;<br>
&gt;<br>
&gt; See CMake&#39;s &quot;CMakeCPack.cmake&quot; and &quot;<a href="http://CMakeCPackOptions.cmake.in" target="_blank">CMakeCPackOptions.cmake.in</a>&quot; files in the<br>
&gt; top level directory for more CPack magic than you&#39;ll be able to absorb on a<br>
&gt; Friday afternoon.... :-)<br>
&gt;<br>
&gt;<br>
&gt; HTH,<br>
&gt; David<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Aug 6, 2010 at 4:45 PM, Chris Wolf &lt;<a href="mailto:cw10025@gmail.com">cw10025@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Earlier, I identified a problem with the &quot;PackageMaker&quot; (Apple) packager,<br>
&gt;&gt; and now, I see the same exact problem with the &quot;DEB&quot; (Debian)<br>
&gt;&gt; packager - it keeps prefixing &quot;./usr&quot; to all the paths.<br>
&gt;&gt;<br>
&gt;&gt; Changing CPACK_PACKAGING_INSTALL_PREFIX doesn&#39;t do anything<br>
&gt;&gt; (even when it&#39;s at the top of the file)<br>
&gt;&gt;<br>
&gt;&gt; This problem does not occur with packagers of type &quot;DragNDrop&quot;,<br>
&gt;&gt; &quot;TGZ&quot; and &quot;TBZ2&quot; - these are Ok.<br>
&gt;&gt;<br>
&gt;&gt; Any help would be great, thanks...<br>
&gt;&gt;<br>
&gt;&gt;  -Chris<br>
&gt;&gt;<br>
&gt;&gt;&gt; Another observation regarding the CPack-generated *.pkg<br>
&gt;&gt;&gt;&gt;&gt; (wrapped in a *.dmg) :<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; The path is prefixed by &quot;./usr&quot;, somehow:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; (assuming the *.dmg is already mounted)<br>
&gt;&gt;&gt;&gt;&gt; $ cd ./libusb-0.1.1-Darwin.pkg/Contents<br>
&gt;&gt;&gt;&gt;&gt; $ lsbom -s Archive.bom<br>
&gt;&gt;&gt;&gt;&gt; .<br>
&gt;&gt;&gt;&gt;&gt; ./usr<br>
&gt;&gt;&gt;&gt;&gt; ./usr/lib<br>
&gt;&gt;&gt;&gt;&gt; ./usr/lib/libusb.dylib<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; So where does the &quot;./usr/&quot; prefix come from?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;m do not know the dmg CPack Generator<br>
&gt;&gt;&gt; (is it PackageMaker or DragNDrop?)<br>
&gt;&gt;&gt;  and I&#39;m not a mac user but each CPack generator has a default<br>
&gt;&gt;&gt; &quot;builtin&quot; CPACK_PACKAGING_INSTALL_PREFIX.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Try<br>
&gt;&gt;&gt; set(CPACK_PACKAGING_INSTALL_PREFIX. &quot;/whatever&quot;)<br>
&gt;&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt;&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>