[CMake] Is there a tool pretty much like cmake for Java?
Andreas Schneider
asn at cynapses.org
Fri Oct 15 17:39:02 EDT 2010
On Friday 15 October 2010 23:13:41 MichaĆ Czuczman wrote:
> I use CMake for building a multi-platform multi-language project where
> for most parts it fits very well. However, one part of the project is
> written in Java, with some native implementations. So it would be great
> to have a nice Java support in CMake. Using another build system just
> for that part adds one to many build-time dependency.
>
> The pitfalls I've encountered in CMake Java support were:
>
> * All objects are always rebuilt.
> * The generated JAR file is polluted with build system CMake files.
>
> This is why I would like to contribute to the great CMake project and
> have a nice simple Java support.
Hi,
this is my current implementation of Java support. It allows you to compile
java files and add resources to it.
http://git.cynapses.org/users/asn/pki.git/tree/cmake/Modules/UseJava.cmake?h=cmake
set(java_SRCS
wurst.java
brot.java
wurstbrot.properties
)
set(CMAKE_JAVA_INCLUDE_PATH gurke.jar)
add_jar(wurstbrot ${java_SRCS})
Cheers,
-- andreas
More information about the CMake
mailing list