[CMake] Componentized Packaging with TGZ generator

Andreas Pakulat apaku at gmx.de
Fri Sep 13 11:22:50 EDT 2013


Hi Eric,

On Fri, Sep 13, 2013 at 5:02 PM, Eric Noulard <eric.noulard at gmail.com>wrote:

> 2013/9/13 Andreas Pakulat <apaku at gmx.de>:
> > Hi,
> >
> > I'm having a bit of an issue with the behaviour of the TGZ generator and
> > componentized packagings. The generation of the packages for the various
> > components works just fine, but unfortunately the contents are not as I'd
> > like them to be.
> >
> > It seems like the TGZ generator drops the 'common' prefix from the
> packages,
> > i.e. my packages have
> >
> > bin/foobar
> > lib/libfoobar.so
> >
> > in them, instead of
> >
> > mypackage-1.0.0-Linux32/bin/foobar
> > mypackage-1.0.0-Linux32/lib/libfoobar.so
> >
> > This is quite annoying extacting the packages pollutes a users system in
> a
> > way that makes it hard to remove the stuff again. Its also different from
> > the behaviour when disabling componentized packaging, there TGZ adds the
> > prefix just fine.
> >
> > I've tried avoiding this with CPACK_INCLUDE_TOPLEVEL_DIRECTORIES set to
> 1,
> > but that seems to make no difference. Am I overlooking something in the
> docs
> > of CMake/CPack that can be tuned to get the behaviour that I want?
>
> Yes there is:CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
>
> cpack --help-variable CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
>

Ah, thanks a lot, that does work.

I should've considered the builtin docs of course. Unfortunately I only
checked  http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack and
http://www.cmake.org/Wiki/CMake:CPackConfiguration..

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130913/e5f6f283/attachment.htm>


More information about the CMake mailing list