From: Mathias Preiner Date: Wed, 15 May 2019 23:26:06 +0000 (-0700) Subject: cmake: Install JAR and JNI files for Java bindings. (#3002) X-Git-Tag: cvc5-1.0.0~4147 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc8907afc08d7b418471a537f9c23e9964df82df;p=cvc5.git 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. --- 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)