[CMake] How can I unzip a file?

David Cole david.cole at kitware.com
Mon Jul 6 11:36:17 EDT 2009


This is incorrect.
CPack only delegates to another installed tool to generate ZIP files. It
does not know how to write ZIP files itself. The same is true for most CPack
-G generators: it orchestrates calling an external tool to generate the
actual package created.


Mathieu, the original question was about extracting info from a .zip file,
not creating a .zip file....



On Mon, Jul 6, 2009 at 11:30 AM, Mathieu Malaterre <
mathieu.malaterre at gmail.com> wrote:

> Well technically you do not need anything extra for ZIP. The only
> missing part IMHO is the API from within CPack (cpack is almost always
> guarantee to be installed on system providing cmake), see my post:
>
> http://www.cmake.org/pipermail/cmake/2009-January/026361.html
>
> I have not been able to find out how to do that, even when trying to
> fool cpack with a dummy CPackConfig.cmake file...
>
> You would then be able to add a custom rule calling cpack, making it
> nicely portable...
>
> 2cts
>
> On Fri, Jul 3, 2009 at 8:07 PM, David Cole<david.cole at kitware.com> wrote:
> > cmake -E tar
> > can untar .tar files and .tar.gz files... But you have to use an external
> > tool for .zip files.
> > We are considering adding libarchive support to be able to handle more
> zip
> > formats, but it has not been tackled yet.
> > (See http://code.google.com/p/libarchive/ for more info.)
> >
> > HTH,
> > David
> >
> > On Fri, Jul 3, 2009 at 1:44 PM, Peter <p.schregle at impuls-imaging.com>
> wrote:
> >>
> >> I can't figure out how I can unzip a set of files with CMake.
> >>
> >> I have a bunch of files in a zip archive, which need to be expanded
> during
> >> the build process and I would like to know how this can be done in a
> >> portable way with CMake?
> >>
> >> Thanks.
> >> Peter
> >>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Please keep messages on-topic and check the CMake FAQ at:
> >> http://www.cmake.org/Wiki/CMake_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.cmake.org/mailman/listinfo/cmake
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
> >
>
>
>
> --
> Mathieu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090706/dbb3d87f/attachment.htm>


More information about the CMake mailing list