summaryrefslogtreecommitdiffstats
path: root/scripts/bundle-mac-os.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bundle-mac-os.sh')
-rwxr-xr-xscripts/bundle-mac-os.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/bundle-mac-os.sh b/scripts/bundle-mac-os.sh
index 8bb1986..8bd387d 100755
--- a/scripts/bundle-mac-os.sh
+++ b/scripts/bundle-mac-os.sh
@@ -22,6 +22,22 @@ usage () {
echo "target [$DEPLOYMENT_TARGET]"
}
+check_tools() {
+ for TOOL in mkdir rm mv git dirname pwd find cut basename grep xargs cmake ninja autoconf automake aclocal autoheader glibtoolize lipo otool install_name_tool;
+ do
+ set +e
+ TOOL_PATH=$(which "$TOOL")
+ set -e
+ echo "$TOOL: $TOOL_PATH"
+
+ if [ ! -f "$TOOL_PATH" ];
+ then
+ echo "Missing $TOOL! please install and add to PATH."
+ exit 1
+ fi
+ done
+}
+
while [[ $# -gt 0 ]]; do
case $1 in
-a|--arch)
@@ -49,6 +65,8 @@ while [[ $# -gt 0 ]]; do
esac
done
+check_tools
+
fix_rpath() {
SEARCH_PATH=$1
FIX_PATH=$1
@@ -94,7 +112,7 @@ replace_rpath() {
}
CMAKE_ARCHS=
-OSSL_FLAGS="-mmacosx-version-min=$DEPLOYMENT_TARGET"
+OSSL_FLAGS="-mmacosx-version-min=$DEPLOYMENT_TARGET -I$INSTALL/include -L$INSTALL/lib"
for ARCH in $DEPLOYMENT_ARCH;
do
OSSL_FLAGS="$OSSL_FLAGS -arch $ARCH"