[CMake] How can I unzip a file?

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Jul 6 11:30:41 EDT 2009


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


More information about the CMake mailing list