diff options
author | Brad King <brad.king@kitware.com> | 2016-03-10 14:16:11 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-03-10 14:16:11 (GMT) |
commit | 3a8c296c8997bdf4f28712358e1717b24cc2773c (patch) | |
tree | 5127f9caabef3cfd277647e77c30c4f4359573c7 | |
parent | 707b400e749f73f614e7e317f89dab5404ad1212 (diff) | |
parent | 1b029ea91fe95f3fb036b3b60cf68c2883727ca3 (diff) | |
download | CMake-3a8c296c8997bdf4f28712358e1717b24cc2773c.zip CMake-3a8c296c8997bdf4f28712358e1717b24cc2773c.tar.gz CMake-3a8c296c8997bdf4f28712358e1717b24cc2773c.tar.bz2 |
Merge topic 'FindJNI-ubuntu-paths'
1b029ea9 FindJNI: Append path only "if(EXISTS"
add25578 FindJNI: Add support for Ubuntu 15.10
-rw-r--r-- | Modules/FindJNI.cmake | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index 135038c..8fe8f7a 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -92,10 +92,14 @@ macro(java_append_library_directories _var) if(_path MATCHES "{libarch}") foreach(_libarch ${_java_libarch}) string(REPLACE "{libarch}" "${_libarch}" _newpath "${_path}") - list(APPEND ${_var} "${_newpath}") + if(EXISTS ${_newpath}) + list(APPEND ${_var} "${_newpath}") + endif() endforeach() else() - list(APPEND ${_var} "${_path}") + if(EXISTS ${_path}) + list(APPEND ${_var} "${_path}") + endif() endif() endforeach() endmacro() @@ -147,6 +151,9 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/{libarch} # can this one be removed according to #8821 ? Alex /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch} /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/{libarch} # fedora + /usr/lib/jvm/java-8-openjdk-{libarch}/lib/{libarch} # ubuntu 15.10 + /usr/lib/jvm/java-7-openjdk-{libarch}/lib/{libarch} # ubuntu 15.10 + /usr/lib/jvm/java-6-openjdk-{libarch}/lib/{libarch} # ubuntu 15.10 # Debian specific paths for default JVM /usr/lib/jvm/default-java/jre/lib/{libarch} /usr/lib/jvm/default-java/jre/lib @@ -181,6 +188,9 @@ list(APPEND JAVA_AWT_INCLUDE_DIRECTORIES "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/include" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include" +) + +JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_INCLUDE_DIRECTORIES /usr/include /usr/local/include /usr/lib/java/include @@ -190,6 +200,9 @@ list(APPEND JAVA_AWT_INCLUDE_DIRECTORIES /usr/lib/jvm/java-1.5.0-sun/include /usr/lib/jvm/java-6-sun-1.6.0.00/include # can this one be removed according to #8821 ? Alex /usr/lib/jvm/java-6-openjdk/include + /usr/lib/jvm/java-8-openjdk-{libarch}/include # ubuntu 15.10 + /usr/lib/jvm/java-7-openjdk-{libarch}/include # ubuntu 15.10 + /usr/lib/jvm/java-6-openjdk-{libarch}/include # ubuntu 15.10 /usr/local/share/java/include /usr/lib/j2sdk1.4-sun/include /usr/lib/j2sdk1.5-sun/include |