+##########################
+# @function vlc_install_object(src_lib, dest_dir, type, lib_install_prefix, destination_name, suffix)
+# @description Installs the specified library into the destination folder, automatically changes the references to dependencies
+# @param src_lib source library to copy to the destination directory
+# @param dest_dir destination directory where the src_lib should be copied to
+vlc_install_object() {
+
+ local src_lib=${1}
+ local dest_dir=${2}
+ local type=${3}
+ local lib_install_prefix=${4}
+ local destination_name=${5}
+ local suffix=${6}
+
+ if [ $type = "lib" ]; then
+ local install_name="@loader_path/lib"
+ elif [ $type = "module" ]; then
+ local install_name="@loader_path/plugins"
+ fi
+ if [ "$destination_name" != "" ]; then
+ local lib_dest="$dest_dir/$destination_name$suffix"
+ local lib_name=`basename $destination_name`
+ else
+ local lib_dest="$dest_dir/`basename $src_lib`$suffix"
+ local lib_name=`basename $src_lib`
+ fi
+
+ if [ "x$lib_install_prefix" != "x" ]; then
+ local lib_install_prefix="$lib_install_prefix"
+ else
+ local lib_install_prefix="@loader_path/../lib"
+ fi
+
+ if ! test -e ${src_lib}; then
+ return
+ fi
+
+ if ((! test -e ${lib_dest}) || test ${src_lib} -nt ${lib_dest} ); then
+
+ mkdir -p ${dest_dir}
+
+ # Lets copy the library from the source folder to our new destination folder
+ if [ "${type}" = "bin" ]; then
+ install -m 755 ${src_lib} ${lib_dest}