[cmake-developers] CPack component and "packaging ways"

Eric Noulard eric.noulard at gmail.com
Fri Mar 4 16:50:52 EST 2011


Hi All,

As of CPack 2.8.4 the component support has been added to
ArchiveGenerator and RPM
(and NSIS and PackageMaker continue to support component packaging)
As explained here;
http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack#CPack_Generator_specific_behavior

Currently NSIS and PackageMaker always generate a single package file which may
contain nice "component" if the project did define appropriate vars.

ArchiveGenerators and RPM (and soon Deb)
may produce a single package file or several package files depending
on user choice.

The current rules of CPack Component:
http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack#Rules
makes it clear that:

A COMPONENT may only belong to either 0 or a single GROUP.
In CPack 2.8.3, you have 4/5 ways to package COMPONENT:

1) the default way : no COMPONENT or MONOLITHIC in order to maintain
backward compatibility

1bis) default way if COMPONENT INSTALL is enabled:
     1 package file per COMPONENT GROUP

2) ALL_GROUPS_IN_ONE
      which means that all COMPONENT GROUPS are put in a single package file

3) ALL_COMPONENTS_IN_ONE
      which means that all COMPONENTS are put in a single package file

4) IGNORE GROUPS
      which means that you get 1 package file per COMPONENT

in 1) ALL INSTALL( xxx) rules found in CMakeLists.txt are processed.

in 2,3,4) Only the rules with COMPONENT belongings to CPACK_COMPONENTS_ALL
     are processed.

i.e. with 1bis, 2,3,4) you will only install the COMPONENT specified
in CPACK_COMPONENTS_ALL
which may only be a portion of all the INSTALL rules.

In CPack 2.8.4, rule 1bis) and 2) do not include COMPONENT that did
not belong to a GROUP
http://public.kitware.com/Bug/view.php?id=11930
this is now fixed (in next) for ArchiveGenerator for 1bis).

I did not fixed it in 2) case because if I do
ALL_GROUPS_IN_ONE would be strictly equal to ALL_COMPONENTS_IN_ONE.

What do you all think about that?
Shall I just merge ALL_GROUPS_IN_ONE and ALL_COMPONENTS_IN_ONE to
"ALL_COMPONENTS_IN_ONE",
or shall I keep the awkward behavior of ALL_GROUPS_IN_ONE
which can left over some components?

I would be tempted to simplify the packaging ways and
get rid of "ALL_GROUPS_IN_ONE".


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



More information about the cmake-developers mailing list