[CMake] Only install one component in cpack

Eric Noulard eric.noulard at gmail.com
Thu Aug 25 07:56:57 EDT 2016


Hi Tonka,

You should read the doc here:
https://cmake.org/cmake/help/v3.5/module/CPackComponent.html

for the ZIP generator you should

set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
this is necessary because archive generator are "MONOLITHIC" by default.

set(CPACK_COMPONENTS_GROUPING IGNORE)
with this grouping you get on package per component
(the default is to have one package per component **group**)

This should produce one zip file per component.
Other grouping variant are possible, read the previous doc.

2016-08-25 13:45 GMT+02:00 tonka tonka <tonka3100 at gmail.com>:

> Hey,
>
> I want to create a zip file with only one component in it. Installers like
> nsis respect the CPACK_COMPONENTS_ALL settings, but the zip generator
> ignores it.
>
> Can I do that?
>
> Alternatively I would like to split every component into a single zip
> file, I know that it is possible but I forgot how to do that.
>
> Greetings
> Tonka
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160825/113c7b87/attachment.html>


More information about the CMake mailing list