[CMake] CPack / Debian install location

Eric Noulard eric.noulard at gmail.com
Fri Feb 3 03:40:40 EST 2012


2012/2/3 Oliver kfsone Smith <osmith at playnet.com>:
> osmith at luciddev:~/pn/WW2/src$ cmake --version
> cmake version 2.8.2
>
> I can't see to get "make package" to generate Debian packages that install
> any place but /usr/bin. (I actually want them in /playnet/ra/bin,
> /playnet/ra/lib and so on)
>
> SET(CPACK_GENERATOR "DEB")
> SET(CPACK_INSTALL_PREFIX "/playnet/ra")
--> this one is only used when
     CPACK_SET_DESTDIR is set to on.

> SET(CPACK_PACKAGE_INSTALL_PREFIX "/playnet/ra")
--> this one is not used anywhere in the CPack code.

The right one is:
set(CPACK_PACKAGING_INSTALL_PREFIX "/playnet/ra")

> SET(CPACK_DEBIAN_INSTALL_PREFIX "/playnet/ra")
This one does not exist (i.e. is not used anywhere).

> SET(CPACK_PACKAGE_VERSION
> "${REPO_WC_REVISION}.${CMAKE_BUILD_TYPE}-${WW2_TARGET_ENV}")
> SET(CPACK_PACKAGE_NAME "servers")
> SET(CPACK_PACKAGE_VENDOR "Cornered Rat Software")
> SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Game servers")
> SET(CPACK_PACKAGE_DESCRIPTION "'Game servers and tools.")
> SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Oliver Smith")

> SET(CPACK_DEBIAN_PACKAGE_INSTALL_PREFIX "/playnet/ra")
This one does not exist as well (i.e. is not used anywhere).

> I've played with a half dozen other variable name combinations, but it still
> all goes into /usr.
Remove all "INSTALL_PREFIX" you have used and set
set(CPACK_PACKAGING_INSTALL_PREFIX "/playnet/ra")

You can specify this on the command line too:

cpack -D CPACK_PACKAGING_INSTALL_PREFIX=/playnet/ra -G DEB

More extensive doc of CPack variables should be coming soon:
http://public.kitware.com/Bug/view.php?id=10067
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list