From fc8907afc08d7b418471a537f9c23e9964df82df Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Wed, 15 May 2019 16:26:06 -0700 Subject: [PATCH] cmake: Install JAR and JNI files for Java bindings. (#3002) Default install paths are: - libcvc4jni.so in /usr/lib/ - CVC4.jar in /usr/share/java/cvc4 Fixes #2990. --- src/bindings/java/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bindings/java/CMakeLists.txt b/src/bindings/java/CMakeLists.txt index 3423a3e1b..573c2ee91 100644 --- a/src/bindings/java/CMakeLists.txt +++ b/src/bindings/java/CMakeLists.txt @@ -241,5 +241,12 @@ set(gen_java_files ${CMAKE_CURRENT_BINARY_DIR}/vectorVectorExpr.java ) -add_jar(cvc4jar SOURCES ${gen_java_files} OUTPUT_NAME CVC4) +set(CMAKE_JNI_TARGET TRUE) +add_jar(cvc4jar + SOURCES ${gen_java_files} + VERSION ${CVC4_MAJOR}.${CVC4_MINOR}.${CVC4_RELEASE} + OUTPUT_NAME CVC4) add_dependencies(cvc4jar cvc4jni) +install_jar(cvc4jar DESTINATION share/java/cvc4) +install_jni_symlink(cvc4jar DESTINATION share/java/cvc4) +install(TARGETS cvc4jni DESTINATION lib) -- 2.30.2