[CMake] Fwd: how to install files outside /usr in rpm?

Timenkov Yuri ytimenkov at parallels.com
Wed May 7 09:14:51 EDT 2008


On Wednesday 07 May 2008 16:59:35 Eric Noulard wrote:
> Oops forgot to CC the list
>
> ---------- Forwarded message ----------
> From: Eric Noulard <eric.noulard at gmail.com>
> Date: 7 mai 2008 14:58
> Subject: Re: [CMake] how to install files outside /usr in rpm?
> To: Erik Sjölund <erik.sjolund at sbc.su.se>
>
> 2008/5/7, Erik Sjölund <erik.sjolund at sbc.su.se>:
> > How do I install the directory /var/lib/myapp in an RPM using
> >
>  >  cmake-2.6.0?
>  >
>  >  This approach:
>  >
>  >  INCLUDE(CPack)
>  >  SET(CPACK_GENERATOR RPM)
>  >  INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION
>  >  var/lib/myapp )
>
> Since DESTINATION is a relative path
>  you'll get installed in
>
>  ${CMAKE_INSTALL_PREFIX}/var/lib/myapp
>
>  Isn't your CMAKE_INSTALL_PREFIX set to /usr ?
>
>  >  installs it under /usr/var/lib/myapp in the RPM.
>
> You may change install prefix (if it's appropriate)
>  or use absolute path in DESTINATION arg of your INSTALL command.
>
>  Note that your example looks straneg to me,
>  are you willing to install you whole source tree
> (${CMAKE_CURRENT_SOURCE_DIR})?
Also, bunch of problems with building from non-root account, can be solved by 
setting CPACK_SET_DESTDIR option.

>
>
>  --
>  Erk




More information about the CMake mailing list