diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2022-03-21 00:14:06 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2022-03-21 00:14:06 +0300 |
commit | 7f989eeec368d3d051aa7f27e9ceea500e9415ef (patch) | |
tree | 509f10c7f96cc2514bdf735bbf23b9423959b69e /build | |
parent | 8249aee3cc38f1f94e3a3c142eb23b9a5dff9875 (diff) |
Support for arm64 on macOS
Diffstat (limited to 'build')
-rw-r--r-- | build/libcvextern.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/build/libcvextern.sh b/build/libcvextern.sh index 88264e7..f6f559c 100644 --- a/build/libcvextern.sh +++ b/build/libcvextern.sh @@ -9,11 +9,17 @@ # cd "$(dirname "$0")" directory="emgucv" +arch_name="$(uname -m)" osVariant="" +if [[ "$arch_name" != "x86_64" && "$arch_name" != "arm64" ]]; then + echo "Error: Unsupported host arch: $arch_name" + exit -1 +fi + for lastArg in $@; do :; done # Get last argument -if [[ $lastArg == "clean" ]]; then +if [ $lastArg == "clean" ]; then echo "Cleaning $directory directory" rm -rf "$directory" 2>/dev/null exit @@ -30,7 +36,7 @@ while getopts 'i' flag; do esac done -echo "Script to build libcvextern.so|dylib" +echo "Script to build libcvextern.so|dylib on $(uname -a) $arch_name" echo "- Detecting OS" [ "$installDependencies" == true ] && echo "- Installing all the dependencies" @@ -92,7 +98,11 @@ fi echo "- Bulding" if [ osVariant == "macOS" ]; then cd platforms/macos - ./configure + if [ "${arch_name}" = "x86_64" ]; then + ./configure_x86_64 + elif [ "${arch_name}" = "arm64" ]; then + ./configure_arm64 + fi else cd platforms/ubuntu/20.04 ./cmake_configure |