Skip to content
Snippets Groups Projects
Commit 911cd1f8 authored by Aline Gondim Santos's avatar Aline Gondim Santos Committed by Adrien Béraud
Browse files

plugins: add macosx abi

GitLab: #508
Change-Id: I77585afd484fa2c8deb5f548b96a0e954f316e32
parent 7c87a8fc
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,12 @@ ifdef HAVE_ANDROID
cd $< && sh build.sh --parallel --android --android_sdk_path $(ANDROID_SDK) --android_ndk_path $(ANDROID_NDK) --android_abi $(ANDROID_ABI) --android_api 29 --use_nnapi --config Release --build_shared_lib --skip_tests --android_cpp_shared --minimal_build extended
cd $< && cp ./build/Linux/Release/libonnxruntime.so $(PREFIX)/lib/
else
ifdef HAVE_MACOSX
cd $< && sh ./build.sh --config Release --build_shared_lib --parallel --skip_tests
if [ ! -d "$(PREFIX)/lib/onnxruntime" ] ; then (mkdir $(PREFIX)/lib/onnxruntime) fi
if [ ! -d "$(PREFIX)/lib/onnxruntime/cpu" ] ; then (mkdir $(PREFIX)/lib/onnxruntime/cpu) fi
cd $< && cp ./build/MacOS/Release/libonnxruntime.dylib $(PREFIX)/lib/onnxruntime/cpu/libonnxruntime.dylib
else
ifdef USE_NVIDIA
cd $< && sh ./build.sh --config Release --build_shared_lib --parallel --use_cuda --cuda_version $(CUDA_VERSION) --cuda_home $(CUDA_PATH) --cudnn_home $(CUDNN_PATH) --skip_tests
if [ ! -d "$(PREFIX)/lib/onnxruntime" ] ; then (mkdir $(PREFIX)/lib/onnxruntime) fi
......@@ -30,6 +36,7 @@ else
if [ ! -d "$(PREFIX)/lib/onnxruntime/cpu" ] ; then (mkdir $(PREFIX)/lib/onnxruntime/cpu) fi
cd $< && cp ./build/Linux/Release/libonnxruntime.so $(PREFIX)/lib/onnxruntime/cpu/libonnxruntime.so
endif
endif
endif
if [ ! -d "$(PREFIX)/include/onnxruntime" ] ; then ( mkdir $(PREFIX)/include/onnxruntime ) fi
cd $< && cp -r ./include/onnxruntime/core/* $(PREFIX)/include/onnxruntime/
......
......@@ -6,6 +6,7 @@ OPENCV_URL := https://github.com/opencv/opencv/archive/$(OPENCV_VERSION).tar.gz
DEPS_opencv += opencv_contrib
OPENCV_CMAKECONF := \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=no \
-DOPENCV_EXTRA_MODULES_PATH="./../../${HOST}/../opencv_contrib/modules" \
......@@ -54,6 +55,10 @@ OPENCV_CMAKECONF := \
-DBUILD_opencv_java=OFF \
-DBUILD_opencv_python=OFF
ifdef HAVE_MACOSX
OPENCV_CMAKECONF += \
-DOPENCV_EXTRA_CXX_FLAGS="-D'CV_PAUSE(int)'"
endif
$(TARBALLS)/opencv-$(OPENCV_VERSION).tar.gz:
$(call download,$(OPENCV_URL))
......
/*
/*
* Copyright (C) 2020-2021 Savoir-faire Linux Inc.
*
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
......@@ -43,9 +43,14 @@ extern "C" {
#define LIB_TYPE ".dll"
#define LIB_PREFIX ""
#else
#ifdef __APPLE__
#define LIB_TYPE ".dylib"
#define LIB_PREFIX "lib"
#else
#define LIB_TYPE ".so"
#define LIB_PREFIX "lib"
#endif
#endif
namespace jami {
......
......@@ -25,7 +25,13 @@
#include <fstream>
#include <regex>
#if defined(__arm__)
#if defined(__APPLE__)
#if (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
#define ABI "iphone"
#else
#define ABI "x86_64-apple-Darwin"
#endif
#elif defined(__arm__)
#if defined(__ARM_ARCH_7A__)
#define ABI "armeabi-v7a"
#else
......@@ -43,10 +49,6 @@
#else
#define ABI "x86_64-linux-gnu"
#endif
#elif defined(__mips64) /* mips64el-* toolchain defines __mips__ too */
#define ABI "mips64"
#elif defined(__mips__)
#define ABI "mips"
#elif defined(__aarch64__)
#define ABI "arm64-v8a"
#elif defined(WIN32)
......@@ -62,7 +64,7 @@ namespace PluginUtils {
const std::regex DATA_REGEX("^data" DIR_SEPARATOR_STR_ESC ".+");
// SO_REGEX is used to find libraries during the plugin jpl uncompressing
const std::regex SO_REGEX("([a-zA-Z0-9]+(?:[_-]?[a-zA-Z0-9]+)*)" DIR_SEPARATOR_STR_ESC
"([a-zA-Z0-9_-]+\\.(so|dll|lib).*)");
"([a-zA-Z0-9_-]+\\.(dylib|so|dll|lib).*)");
std::string
manifestPath(const std::string& rootPath)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment