[CMake] CPack: CPACK_COMPONENT_GROUP in cmake 2.8.3 / Windows binary zip

Eric Noulard eric.noulard at gmail.com
Tue Feb 8 13:29:31 EST 2011


2011/2/8 Mathieu Malaterre <mathieu.malaterre at gmail.com>:
> Hi Eric,
>
>  Thanks a bunch for your tremendous work !

You're welcome, feedback of this feature is welcomed.

>  Quick question would this means that the warning will also go away:
>
> "CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL
> have been set."
>
>  AFAIK  CPACK_COMPONENTS_ALL is required to be set to list all
> different components, but I still need  CPACK_MONOLITHIC_INSTALL for
> backward compatibility.

No the warning will not go away because you shouldn't usually use both.
(in fact it may go away because you won't need to set CPACK_MONOLITHIC_INSTALL
 anymore ...)

CPACK_MONOLITHIC_INSTALL override the effect of CPACK_COMPONENTS_ALL
because it basically makes CPack **totally ignore** component installation.

So with 2.8.3 you need CPACK_COMPONENTS_ALL to get your unique zip file
but this is a bug fixed in 2.8.4.

Now be aware that CPACK_COMPONENTS_ALL has not the same purpose
it is there to list the name of the component(s) you want to install
whenever you
use a component-aware installer.

If you omit some component in CPACK_COMPONENTS_ALL then they
won't be included in the componentized package.

If some INSTALL rule do not use the COMPONENT argument then
the target will belong to the "Unspecified" component (builtin
"default" component name).
And if "Unspecified" is not listed in CPACK_COMPONENTS_ALL you won't
get those target either.

CPACK_MONOLITHIC_INSTALL=1/ON will include ALL install rule
regardless of the COMPONENT argument.

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


More information about the CMake mailing list