speedb
speedb copied to clipboard
cmake: build the final Jar when compiled with WITH_JNI
Unlike the Makefile, which builds a Jar with an embedded shared library (and without tests), the CMake code builds a Jar with the Java classes only (including some Java tests), which is somewhat unusable. Allow building the full Jar with the embedded shared library from CMake as well, and allow running the Java tests as well as part of the check
target.
CMake's UseJava
module supports adding resources since CMake 3.21, but we need to support CMake 3.12 for now, so we can't use that, which means that adding the shared library will need to be done using a custom command. Also, there's some weird dependency graph currently, because the JNI headers that librocksdbjni.so
depends on are generated by the add_jar()
command of the Java classes Jar, but we need librocksdbjni.so
for creating the final Jar.
@speedbmike - please have a look