fix for max
This commit is contained in:
@ -156,7 +156,7 @@ copy_dependencies() {
|
|||||||
log INFO "Collecting dynamic libraries from vcpkg..."
|
log INFO "Collecting dynamic libraries from vcpkg..."
|
||||||
local triplets=("arm64-osx" "x64-osx" "universal-osx")
|
local triplets=("arm64-osx" "x64-osx" "universal-osx")
|
||||||
local bases=("$BUILD_DIR/vcpkg_installed" "vcpkg_installed")
|
local bases=("$BUILD_DIR/vcpkg_installed" "vcpkg_installed")
|
||||||
declare -A copied=()
|
local copied_names=()
|
||||||
|
|
||||||
for base in "${bases[@]}"; do
|
for base in "${bases[@]}"; do
|
||||||
for triplet in "${triplets[@]}"; do
|
for triplet in "${triplets[@]}"; do
|
||||||
@ -165,9 +165,16 @@ copy_dependencies() {
|
|||||||
if [[ -d "$dir" ]]; then
|
if [[ -d "$dir" ]]; then
|
||||||
while IFS= read -r -d '' dylib; do
|
while IFS= read -r -d '' dylib; do
|
||||||
local name=$(basename "$dylib")
|
local name=$(basename "$dylib")
|
||||||
if [[ -z ${copied[$name]:-} ]]; then
|
local seen=0
|
||||||
|
for existing in "${copied_names[@]}"; do
|
||||||
|
if [[ "$existing" == "$name" ]]; then
|
||||||
|
seen=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if (( !seen )); then
|
||||||
cp "$dylib" "$PACKAGE_DIR/"
|
cp "$dylib" "$PACKAGE_DIR/"
|
||||||
copied[$name]=1
|
copied_names+=("$name")
|
||||||
log OK "Copied $name"
|
log OK "Copied $name"
|
||||||
fi
|
fi
|
||||||
done < <(find "$dir" -maxdepth 1 -type f -name '*.dylib' -print0)
|
done < <(find "$dir" -maxdepth 1 -type f -name '*.dylib' -print0)
|
||||||
@ -176,7 +183,7 @@ copy_dependencies() {
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ${#copied[@]} -eq 0 ]]; then
|
if [[ ${#copied_names[@]} -eq 0 ]]; then
|
||||||
log WARN "No .dylib files found; ensure vcpkg installed macOS triplet dependencies."
|
log WARN "No .dylib files found; ensure vcpkg installed macOS triplet dependencies."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user