+##########################
+# @function vlc_install(src_lib_dir, src_lib_name, dest_dir, type, lib_install_prefix)
+# @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() {
+ local dest_dir=$3
+ local type=$4
+
+ if test "$use_archs" = "no"; then
+ vlc_install_object "$VLC_BUILD_DIR/$1/$2" "$dest_dir" "$type" $5
+ else
+ if test $type = "data"; then
+ vlc_install_object "$main_build_dir/$1/$2" "$dest_dir" "$type" $5
+ else
+ objects=""
+ mkdir -p "tmp/$1"
+ newinstall="no"
+ for arch in $ARCHS; do
+ vlc_install_object "$VLC_BUILD_DIR/$arch/$1/$2" "tmp/$1" "$type" "$5" "$2.$arch"
+ local dest="tmp/$1/$2.$arch"
+ if test -e ${dest}; then
+ if test "$VLC_BUILD_DIR/$arch/$1/$2" -nt "${dest}"; then
+ echo "$VLC_BUILD_DIR/$arch/$1/$2 newer than ${dest}"
+ newinstall="yes"
+ fi
+ objects="${dest} $objects"
+ else
+ echo "Warning: building $2 without $arch"
+ fi
+ done;
+ if test "$newinstall" = "yes"; then
+ echo "Creating fat $type $2"
+ lipo $objects -output "${dest}" -create
+ fi
+ fi
+ fi
+}
+# @function vlc_install
+##########################
+