diff options
author | O. Libre <olibre@Lmap.org> | 2016-03-08 05:06:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-09 13:55:13 (GMT) |
commit | 1b029ea91fe95f3fb036b3b60cf68c2883727ca3 (patch) | |
tree | 08e0b1c2d7e971bced608e30eb710fafd19475fe | |
parent | add2557865923af058334ba64a889842fc2abd05 (diff) | |
download | CMake-1b029ea91fe95f3fb036b3b60cf68c2883727ca3.zip CMake-1b029ea91fe95f3fb036b3b60cf68c2883727ca3.tar.gz CMake-1b029ea91fe95f3fb036b3b60cf68c2883727ca3.tar.bz2 |
FindJNI: Append path only "if(EXISTS"
-rw-r--r-- | Modules/FindJNI.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index 467e3d6..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() |