From a56a53e72db9a885fc50ea5007c342e64bf4cb9f Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Mon, 18 Apr 2016 12:07:18 +0100 Subject: [PATCH] [CMake] Fix installation location of ``com.microsoft.z3.jar`` when using CMake 2.8.12.2. It seems ``install_jar()`` in the version of ``UseJava.cmake`` shipped with that version of CMake doesn't handle the ``DESTINATION`` argument correctly and treats that as the installation location so CMake would install to ``/usr/local/DESTINATION`` rather than ``/usr/locale/share``. --- contrib/cmake/src/api/java/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/cmake/src/api/java/CMakeLists.txt b/contrib/cmake/src/api/java/CMakeLists.txt index 3663422f0..49d4a8841 100644 --- a/contrib/cmake/src/api/java/CMakeLists.txt +++ b/contrib/cmake/src/api/java/CMakeLists.txt @@ -232,5 +232,7 @@ if (INSTALL_JAVA_BINDINGS) install(TARGETS z3java LIBRARY DESTINATION "${Z3_JAVA_JNI_LIB_INSTALLDIR}" ) - install_jar(z3JavaJar DESTINATION "${Z3_JAVA_JAR_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}") endif()