mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
updating java cmake scrip
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
527f824adf
commit
2af1cff11f
|
@ -204,11 +204,13 @@ add_custom_target(build_z3_java_bindings
|
||||||
|
|
||||||
# Rule to build ``com.microsoft.z3.jar``
|
# Rule to build ``com.microsoft.z3.jar``
|
||||||
# TODO: Should we set ``CMAKE_JNI_TARGET`` to ``TRUE``?
|
# TODO: Should we set ``CMAKE_JNI_TARGET`` to ``TRUE``?
|
||||||
|
# REMARK: removed VERSION to fix issue with using this to create installations.
|
||||||
|
|
||||||
add_jar(z3JavaJar
|
add_jar(z3JavaJar
|
||||||
SOURCES ${Z3_JAVA_JAR_SOURCE_FILES_FULL_PATH}
|
SOURCES ${Z3_JAVA_JAR_SOURCE_FILES_FULL_PATH}
|
||||||
OUTPUT_NAME ${Z3_JAVA_PACKAGE_NAME}
|
OUTPUT_NAME ${Z3_JAVA_PACKAGE_NAME}
|
||||||
OUTPUT_DIR "${PROJECT_BINARY_DIR}"
|
OUTPUT_DIR "${PROJECT_BINARY_DIR}"
|
||||||
VERSION "${Z3_VERSION}"
|
# VERSION "${Z3_VERSION}"
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -219,21 +221,22 @@ if (Z3_INSTALL_JAVA_BINDINGS)
|
||||||
# Provide cache variables for the install locations that the user can change.
|
# Provide cache variables for the install locations that the user can change.
|
||||||
# This defaults to ``/usr/local/java`` which seems to be the location for ``.jar``
|
# This defaults to ``/usr/local/java`` which seems to be the location for ``.jar``
|
||||||
# files on Linux distributions
|
# files on Linux distributions
|
||||||
set(Z3_JAVA_JAR_INSTALLDIR
|
if (NOT Z3_JAVA_JAR_INSTALLDIR)
|
||||||
"${CMAKE_INSTALL_DATAROOTDIR}/java"
|
set(Z3_JAVA_JAR_INSTALLDIR
|
||||||
CACHE
|
"${CMAKE_INSTALL_DATAROOTDIR}/java"
|
||||||
PATH
|
CACHE
|
||||||
"Directory to install Z3 Java jar file relative to install prefix"
|
PATH
|
||||||
)
|
"Directory to install Z3 Java jar file relative to install prefix"
|
||||||
# FIXME: I don't think this the right installation location
|
)
|
||||||
set(Z3_JAVA_JNI_LIB_INSTALLDIR
|
endif()
|
||||||
"${CMAKE_INSTALL_LIBDIR}"
|
if (NOT Z3_JAVA_JNI_LIB_INSTALLDIR)
|
||||||
CACHE
|
set(Z3_JAVA_JNI_LIB_INSTALLDIR
|
||||||
PATH
|
"${CMAKE_INSTALL_LIBDIR}"
|
||||||
"Directory to install Z3 Java JNI bridge library relative to install prefix"
|
CACHE
|
||||||
)
|
PATH
|
||||||
|
"Directory to install Z3 Java JNI bridge library relative to install prefix"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
install(TARGETS z3java DESTINATION "${Z3_JAVA_JNI_LIB_INSTALLDIR}")
|
install(TARGETS z3java DESTINATION "${Z3_JAVA_JNI_LIB_INSTALLDIR}")
|
||||||
# Note: Don't use ``DESTINATION`` here as the version of ``UseJava.cmake`` shipped
|
|
||||||
# with CMake 2.8.12.2 handles that incorrectly.
|
|
||||||
install_jar(z3JavaJar "${Z3_JAVA_JAR_INSTALLDIR}")
|
install_jar(z3JavaJar "${Z3_JAVA_JAR_INSTALLDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue