[CMake] Java support - install with components

Andreas Schneider asn at cryptomilk.org
Sat Dec 10 09:35:42 EST 2011


On Thursday 20 October 2011 11:59:05 Allen D Byrne wrote:
> I've upgraded my Java project to the latest 2.8.6 release. The only thing
> missing for me is to allow components on the install commands. I just did
> the following:

Hi Allen,

> function(INSTALL_JAR _TARGET_NAME _DESTINATION _COMPONENT)
>     get_property(__FILES
>         TARGET
>             ${_TARGET_NAME}
>         PROPERTY
>             INSTALL_FILES
>     )
> 
>     if (__FILES)
>         install(
>             FILES
>                 ${__FILES}
>             DESTINATION
>                 ${_DESTINATION}
>             COMPONENT
>                 ${_COMPONENT}
>         )
>     else (__FILES)
>         message(SEND_ERROR "The target ${_TARGET_NAME} is not known in this
> scope.") endif (__FILES)
> endfunction(INSTALL_JAR _TARGET_NAME _DESTINATION _COMPONENT)

Sorry, this is not acceptable. If component should be added, it should be 
optional.

Patches are welcome :)


	-- andreas


-- 
Andreas Schneider                   GPG-ID: F33E3FC6
www.cryptomilk.org                asn at cryptomilk.org



More information about the CMake mailing list