aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common
diff options
context:
space:
mode:
authorArtem Dyomin <artem.dyomin@qt.io>2023-12-05 15:58:52 +0100
committerArtem Dyomin <artem.dyomin@qt.io>2023-12-24 16:48:27 +0000
commita3c489b272c63994d5b74a2b6caa24e0f5472ff0 (patch)
tree497f4689477698958d8ad935e362df4c7a6071e6 /coin/provisioning/common
parent782e1700cfd2e87f57005189ace2ea51e1ed84b0 (diff)
Retain symlinks upon making universal macos binaries
Saving symlinks is important when we build dynamic libs, it will be needed for building QtMM + dynamic ffmpeg. Pick-to: 6.7 6.6 6.5 Change-Id: Ic356a9c3df727a1afe14e8553728952d3b106ba3 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Diffstat (limited to 'coin/provisioning/common')
-rwxr-xr-xcoin/provisioning/common/macos/makeuniversal.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/coin/provisioning/common/macos/makeuniversal.sh b/coin/provisioning/common/macos/makeuniversal.sh
index 1baff747..7becddaa 100755
--- a/coin/provisioning/common/macos/makeuniversal.sh
+++ b/coin/provisioning/common/macos/makeuniversal.sh
@@ -4,16 +4,22 @@
# Copies or lipos files from the given DESTDIR dirs to the respective install dir
-set -e
+set -x
for dir in "$@"; do
echo "Processing files in $dir ..."
pushd "$dir" >/dev/null
- find . -type f | while read -r f; do
+ find . -type f -or -type l | while read -r f; do
dst="${f:1}"
dstdir="$(dirname "$dst")"
mkdir -p "$dstdir"
- if [[ ! -f "$dst" ]]; then
+
+ if [[ -L "$f" ]]; then
+ if [[ ! -L "$dst" ]]; then
+ echo "Copying symlink $dir/$f to $dst"
+ cp -P -n "$f" "$dst"
+ fi
+ elif [[ ! -f "$dst" ]]; then
echo "Copying $dir/$f to $dst"
cp -c "$f" "$dst"
elif lipo -info "$f" >/dev/null 2>&1; then