This reply applies to CVS CMake only. This functionality is new and is *not* in the CMake-2-4 branch.<br><br>In your main CMakeLists.txt file (or wherever you set all your other CPack options) do something like this:<br> CONFIGURE_FILE("${MyProject_SOURCE_DIR}/MyProjectCPackOptions.cmake.in"
<br> "${MyProject_BINARY_DIR}/MyProjectCPackOptions.cmake" @ONLY)<br> SET(CPACK_PROJECT_CONFIG_FILE "${MyProject_BINARY_DIR}/MyProjectCPackOptions.cmake")<br><br>And then in the file "${MyProject_SOURCE_DIR}/MyProjectCPackOptions.cmake.in" do this:
<br> IF("${CPACK_GENERATOR}" STREQUAL "DEB")<br> SET(CPACK_PACKAGING_INSTALL_PREFIX "/")<br> ENDIF("${CPACK_GENERATOR}" STREQUAL "DEB")<br><br>The CPACK_PROJECT_CONFIG_FILE, if there is one, is read during package generation by CPack. It is read once for each generator and CPACK_GENERATOR will be set to the exact generator being used. The CPACK_PACKAGING_INSTALL_PREFIX is used as the root of the install tree when building the end user installer package.
<br><div><span class="gmail_quote"><br><br>Hope this helps, (sorry it took a while to reply)<br>David Cole<br><br><br>On 12/17/07, <b class="gmail_sendername">Raphael Cotty</b> <<a href="mailto:raphael.cotty@googlemail.com">
raphael.cotty@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>I am using CPack with DEB generator. My install dir is in /work/install/Project and I have a usr and a etc dir installed.
<br>But the debian package generated by CPack inserts a usr directory so I get my usr in usr/usr and my etc in /usr/etc.
<br>I don't manage to understand why and where is inserted this directory.<br>Any idea how I could remove it?<br><br>Thanks very much!<br>Raph<br><br>ps:<br>I am using cmake and cpack version 2.5-20071214.<br>
<br>_______________________________________________<br>CMake mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:CMake@cmake.org">CMake@cmake.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">
http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>