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

Eric Noulard eric.noulard at gmail.com
Wed May 7 08:59:35 EDT 2008


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})?


 --
 Erk


-- 
Erk


More information about the CMake mailing list