[CMake] Problems with CPack RPM

Markus Mäkelä markus456 at gmail.com
Sun Apr 26 10:41:23 EDT 2015


Hi,

Thanks for your response. I think I'll try using / as the install prefix.
This would seem like a good solution for my situation.

The GNUinstallDIRS module seems like a good way to manage installation
directories across all distributions. I haven't come across it before so
thank you for that also.

Markus
On Apr 26, 2015 3:16 PM, "Domen Vrankar" <domen.vrankar at gmail.com> wrote:

> 2015-04-25 11:01 GMT+02:00 Markus Mäkelä <markus456 at gmail.com>:
> > Hi,
> >
> > I'm working on a project that uses CMake for build configuration and
> > CPack for packaging. We're running on Linux and seem to run into some
> > issues with CPack when INSTALL commands have absolute paths.
> >
> > When we use Makefiles as the build tool, have absolute paths in the
> > DESTINATION of the INSTALL command and we are building RPM or DEB
> > packages, the make package commands seems to install these files to
> > those absolute paths on the system we are doing the packaging on. This
> > makes it so that we need to use root to build packages and I'd like to
> > avoid this.
> >
> > Is this a bug with how CPack handles RPM and DEB packaging or am I doing
> > something wrong? I've managed to somewhat bypass this by doing a lot of
> > the absolute path installations in the post-install script but in the
> > long run I would like to avoud this.
>
> Hi,
>
> It's probably a bug.
> I've noticed this a while ago on Redhat Linux (worked fine on Ubuntu
> though) but haven't got arround to investigate why that happens - for
> me it's lower priority as not all package generators even support
> absolute paths.
>
> As a workarround you could use relative paths and choose for INSTALL
> and PACKAGING prefix / and manage other relocation subpaths with
> relative paths from
> http://www.cmake.org/cmake/help/v3.2/module/GNUInstallDirs.html (with
> CPack 3.2 and above you can use multiple relocation prefixes).
>
> Regards,
> Domen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150426/3793f8f8/attachment-0001.html>


More information about the CMake mailing list