microsoft/onnxruntime-extensions

Public

mirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.5.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

build.android

22lines · modecode

1#!/bin/bash
2
3# The example file on building the static library for android
4set -e -x -u
5
6OSNAME=android
7if [[ -z ${NDK_ROOT+x} ]]; then NDK_ROOT=`ls -d $HOME/Android/Sdk/ndk/* 2>/dev/null`; fi
8if [[ -z "${NDK_ROOT}" ]]
9then
10 echo "ERROR: cannot find where NDK was installed, using NDK_ROOT to specify it"
11 exit 7
12fi
13
14mkdir -p out/$OSNAME/Release && cd out/$OSNAME/Release
15
16cmake "$@" \
17 -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake \
18 -DANDROID_NDK=${NDK_ROOT} \
19 -DANDROID_ABI=armeabi-v7a \
20 -DANDROID_PLATFORM=android-19 \
21 -DOCOS_ENABLE_SPM_TOKENIZER=ON \
22 ../../.. && cmake --build . --config Release --parallel
23