summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindJNI.cmake8
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()