From c167693ae4918b8cf74d83bec6e923d8db2c5d7b Mon Sep 17 00:00:00 2001 From: Robert van Bregt Date: Fri, 12 May 2017 11:10:43 +0200 Subject: [PATCH] add fix for mac qt build environment Signed-off-by: Robert van Bregt --- utils/fix_mac.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 utils/fix_mac.sh diff --git a/utils/fix_mac.sh b/utils/fix_mac.sh new file mode 100755 index 000000000..2e4e84e5e --- /dev/null +++ b/utils/fix_mac.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Canonical path to qt5 directory +QT="/usr/local/Cellar/qt" +if [ ! -d "$QT" ]; then + # Alternative (old) path to qt5 directory + QT+="5" + if [ ! -d "$QT" ]; then + echo "Qt/Qt5 not found!" + exit + fi +fi +QT5_DIR="$QT/$(ls $QT | sort -r | head -n1)" +echo $QT5_DIR + +# Change qt5 framework ids +for framework in $(find "$QT5_DIR/lib" -regex ".*/\(Qt[a-zA-Z]*\)\.framework/Versions/5/\1"); do + echo "$framework" + install_name_tool -id "$framework" "$framework" +done