[CMake] CPack Generator jar support

Eric Noulard eric.noulard at gmail.com
Fri Nov 11 02:48:40 EST 2011


2011/11/10 Alexander Broekhuis <a.broekhuis at gmail.com>:
>
>
>> By the way did you suppress the INSTALL rule concerning the MANIFEST
>> you may have had before?
>
> Yes, this is what I tried. CMake seems to make an intermediate directory
> which is zipped. So the order of the INSTALL/CPACK_INSTALLED_DIRECTORIES
> doesn't seem to have an impact.

Right.

>> I bet the safest way to build your jar may be to craft the appropriate
>> 'jar' whatever command
>> wrapped-up in a CMake custom command/target
>> (see add_custom_command add_custom_targt)
>> may be something that would
>>
>> 1) call cpack -G ZIP in order to have the clean zip file
>> 2) jar xvf your_package.zip
>> 3) jar cvf your_package.jar
>>
>> or use any custom option for jar in step 3.
>>
>> This is clearly doable with a CMake scripts.
>
> Thanks for the hints, I have now solved it this way. I was hoping it would
> be simple to add a new generator to CPack.

It is simple, indeed :-]
But this currently need C++ programming.


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


More information about the CMake mailing list