[CMake] Rename unspecified component - how?

Eric Noulard eric.noulard at gmail.com
Sun Sep 18 05:16:24 EDT 2011


2011/9/18 Eric Noulard <eric.noulard at gmail.com>:
> 2011/9/18 Kishore Jonnalagadda <kitts.mailinglists at gmail.com>:
>> On Sat, Sep 17, 2011 at 2:12 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
>>> 2011/9/17 Kishore Jonnalagadda <kitts.mailinglists at gmail.com>:
>>>> In my project I am using the default component for all binaries and a "dev"
>>>> component for headers.
>>>>
>>>> But when I create packages, it creates one called "Unspecified" and another
>>>> called dev. How do I rename the unspecified component to be nameless?
>>>>
>>>> Something like myproj.deb and myproj-dev.deb?
>>>
>>> In fact I think currently you can't.
>>> or may be yo can try
>>>  set(CPACK_COMPONENT_UNSPECIFIED_DISPLAY_NAME "")
>>> which is not supposed to work but may be it will.
>>
>> You were right. Setting that variable did not help.
>
> Yes.
> and as indicated by Alex, this can not work.
> Currently CPack component aware generator do mangle the package name using
> the name of the component.
> This HAS TO BE this way because we want to be sure not to overwrite
> one component
> package with the other.
>
> Now there is a possible workaround for your request if you do run cpack twice.
>
> 1) Generate all the "name-mangled" package:
>
>    set(CPACK_DEB_COMPONENT_INSTALL ON)
>    set(CPACK_COMPONENTS_ALL lib dev data)
>    cpack -G DEB
>
> 2) Generate an all-in-one package which contains only one component
>    (I suppose you 'main' component is called "main")
>
>    cpack -D CPACK_COMPONENTS_ALL="main" -D
> CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE=1 -G DEB
>
>   In this case (see
> http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack#Controlling_Differents_Ways_of_packaging_components)
>   your requested an "all-in-one" component package whose name is not mangled.
>  All-in-one package is a way to tell "multi-file-component-aware"
> package generator (RPM, DEB, Archive)
>  th

... sorry slippy fingers.

  that you want a single package file whose content is the list of
component specified by
  CPACK_COMPONENTS_ALL.



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


More information about the CMake mailing list