2010/1/30 Iman Brouwer <iman.brou...@gmail.com>: > I was also struggling to get cpack to install anywhere else but in /usr when > creating a DEB package. The following worked for me: > > set( CMAKE_INSTALL_PREFIX /usr/local/or/where/ever/i/want ) > set(CPACK_SET_DESTDIR TRUE) > include( CPack ) > > Iman > > P.S. Make sure you have 'include( CPack )' after you set the variables. > > On Sat, Jan 9, 2010 at 5:17 AM, Daniel Stonier <d.ston...@gmail.com> wrote: >> >> How does one cpack a deb into a toolchain's location? >> With cmake_install_prefix I can get it to compile and install into the >> correct place easily for both native builds (/usr/local) and cross-builds >> (/usr/arm-unknown-linux-gnueabi/usr/local). >> However, cpack ignores these settings and also seems to ignore any of the >> cpack settings...putting everything into /usr. >> >> The variables that dont seem to do anything: >> >> CPACK_PACKAGE_INSTALL_DIRECTORY >> CPACK_INSTALL_PREFIX >> CPACK_SET_DESTDIR >> Is there a 'correct' approach to enabling this? >>
Looks like you finally got to where I was to. Another thing, and I'll confirm this when I get a chance, but I think from my messing around that with cmake 2.8 you can not only set the install directory for relative install locations, but also force absolutely referenced install locations (e.g. INSTALL(FILES ${DOCS} /opt/ros/ycp/docs)) with the destdir command. Currently, my cpack configuration is like follows: SET(CPACK_SET_DESTDIR ON) SET(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Other cpack calls INCLUDE(CPack) -- Phone : +82-10-5400-3296 (010-5400-3296) Home: http://snorriheim.dnsdojo.com/ Yujin Robot: http://www.yujinrobot.com/ Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake