From 38201dfb83e46ee269cd940c5684dd4e97bc61fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Concei=C3=A7=C3=A3o?= Date: Fri, 28 Oct 2022 20:16:22 +0100 Subject: [PATCH] Update libcvextern.sh --- build/libcvextern.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/build/libcvextern.sh b/build/libcvextern.sh index 3a0fa35..2233b0f 100644 --- a/build/libcvextern.sh +++ b/build/libcvextern.sh @@ -10,14 +10,14 @@ # cd "$(dirname "$0")" directory="emgucv" -arch_name="$(uname -m)" +arch="$(uname -m)" osVariant="" build_package="mini" # mini, core, full testcmd() { command -v "$1" &> /dev/null; } -if [ "$arch_name" != "x86_64" -a "$arch_name" != "arm64" ]; then - echo "Error: Unsupported host arch: $arch_name" +if [ "$arch" != "x86_64" -a "$arch" != "arm64" ]; then + echo "Error: Unsupported host arch: $arch" exit -1 fi @@ -41,7 +41,7 @@ while getopts 'i' flag; do esac done -echo "Script to build libcvextern.so|dylib on $(uname -a) $arch_name" +echo "Script to build libcvextern.so|dylib on $(uname -a) $arch" echo "- Detecting OS" [ "$installDependencies" == true ] && echo "- Installing all the dependencies" @@ -116,11 +116,7 @@ cd "$directory" echo "- Bulding" if [ osVariant == "macOS" ]; then cd "platforms/macos" - if [ "${arch_name}" = "x86_64" ]; then - ./configure x86_64 $build_package - elif [ "${arch_name}" = "arm64" ]; then - ./configure arm64 $build_package - fi + ./configure $arch $build_package else cd "platforms/ubuntu/22.04" ./cmake_configure $build_package