[CMake] Problems with CPack RPM

Markus Mäkelä markus456 at gmail.com
Sat Apr 25 05:01:43 EDT 2015


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.

Markus



More information about the CMake mailing list