[CMake] CPack Generator jar support

Eric Noulard eric.noulard at gmail.com
Wed Nov 9 17:07:05 EST 2011


2011/11/9 David Cole <david.cole at kitware.com>:
> Adding a generator will require C++ modifications to the CPack code...

but knowing that a jar file is a zip file subclassing
cmCPackArchiveGenerator.[h|cxx] to cmCPackJARGenerator.[h|cxx]
in the same way
cmCPackZIPGenerator does
should be fairly straightforward.

Then you need to add a test.

If Alexander want to try that I may take the time to review the code.

the real question is:
   Is it of general interest to add such a generator to CPack?
  (no offense to your need Alexander).

By the way did you try the ZIP generator with

set(CPACK_INSTALLED_DIRECTORIES "/path/to/META-INF;/META-INF")

if some local (to the build) directory /path/to/META-INF contains
the appropriate MANIFEST.MF and INDEX.LIST your jar should be built ok
beside the fact it will have the zip extension.



> On Wed, Nov 9, 2011 at 2:31 PM, Alexander Broekhuis
> <a.broekhuis at gmail.com> wrote:
>> Hi all,
>> It is possible to add a custom generator to cpack?
>> What I'd like to have is a generator for Jar files. I know a jar file is
>> basically the same as a zip file, but there is one distinct difference, the
>> Manifest directory is always at the start of the file.
>> For a specific solution I am working on I need to generate Jar files, even
>> though there is no java library in it.
>> So can this easily be added via a Module? Or does this need to be added to
>> the CPack code?
>> TiA!
>>
>> --
>> Met vriendelijke groet,
>>
>> Alexander Broekhuis
>>
>> --
>>
>> 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
>



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


More information about the CMake mailing list