···1010 #
1111 # This could alternatively be fixed with patchelf --add-needed, but this would cause all the libraries to be opened immediately,
1212 # which is not what application authors expect.
1313- echo "$runtimeDependencyLibraryPath"
1414- if [[ ! -z "$runtimeDependencyLibraryPath" ]]; then
1515- wrapProgramArgs+=(--suffix LD_LIBRARY_PATH : \"$runtimeDependencyLibraryPath\")
1313+ APPLICATION_LD_LIBRARY_PATH=""
1414+ for runtimeDependency in "${runtimeDependencies[@]}"; do
1515+ addToSearchPath APPLICATION_LD_LIBRARY_PATH "${runtimeDependency}/lib"
1616+ done
1717+ if [[ ! -z "$APPLICATION_LD_LIBRARY_PATH" ]]; then
1818+ wrapProgramArgs+=(--suffix LD_LIBRARY_PATH : \"$APPLICATION_LD_LIBRARY_PATH\")
1619 fi
17201821 if [[ ! -z "$extraWrapProgramArgs" ]]; then