[CMake] How to pack a target/file into multiple packages in Linux?
Ralph Zhang
ralph.j.zhang at gmail.com
Mon Nov 5 02:14:56 EST 2012
That solves my problem, thank you!
On Fri, Nov 2, 2012 at 4:56 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
> 2012/11/2 Ralph Zhang <ralph.j.zhang at gmail.com>:
> > Hi guys
> >
> > I'm working on a project which generates quite a few executables,
> libraries
> > and configs, they need to be packed into different packages for
> deployment.
> > The problem is, the inclusion of those targets/files is not mutual
> > exclusive. One target/file can belong to multiple packages.
> >
> > I'm using CMake 2.8.9 and trying CPack.
>
> Which cpack generator are you targeting? NSIS, PackageMaker, RPM, DEB, ZIP?
>
> > I know it's kind of doable with
> > install types. But my platform is Ubuntu, so on Archives/Debs are
> acceptable
> > and they don't seem to support that.
> >
> > With components/groups/parent groups it seems only possible to pack one
> > target/file into one component/group.
> >
> > Is there any way out of this?
>
> I bet that currently you'll have to run cpack as many time as you have
> packages.
>
> 1) Define the components that you need
>
> 2) Define CPACK_INSTALL_CMAKE_PROJECTS (and possibly other CPACK_xxx)
> variables when launching CPack (could be done using a custom command)
> Using this var you can decide which component will be installed so
> that you can
> include/exclude component.
> You may override "CPACK_COMPONENTS_ALL" as well.
>
> this can be done on the command line
> cpack -D CPACK_INSTALL_CMAKE_PROJECTS="..."
>
> or from within a CPACK_PROJECT_CONFIG_FILE.
>
> more info:
> cpack --help-variable CPACK_COMPONENTS_ALL
> cpack --help-variable CPACK_INSTALL_CMAKE_PROJECTS
> cpack --help-variable CPACK_PROJECT_CONFIG_FILE
>
>
> --
> Erk
> Le gouvernement représentatif n'est pas la démocratie --
> http://www.le-message.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121105/4af951dd/attachment.htm>
More information about the CMake
mailing list