Skip to content

Commit 9a09d95

Browse files
committed
Polish ORT building command for MacOS
1 parent 4302cb9 commit 9a09d95

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

packaging/debian_3rdparty/build_onnx.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,25 @@ python3 -m pip install cmake
2323

2424
CMAKE_EXTRA_DEFINES="FETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER CMAKE_INSTALL_PREFIX=${PREFIX}"
2525
OS=$(uname -s)
26+
CONFIG=Release
2627

2728
if [ "$OS" = "Darwin" ]; then
2829
DIR_OS="MacOS"
29-
CMAKE_EXTRA_DEFINES+=' CMAKE_OSX_ARCHITECTURES="arm64"'
30+
CMAKE_EXTRA_DEFINES+=' CMAKE_OSX_ARCHITECTURES=arm64'
3031
SUFFIX="${LIBONNXRUNTIME_VERSION}.dylib*"
32+
33+
./build.sh \
34+
--config $CONFIG \
35+
--build_shared_lib \
36+
--parallel \
37+
--skip_submodule_sync \
38+
--skip_tests \
39+
--cmake_extra_defines $CMAKE_EXTRA_DEFINES
3140
else
3241
DIR_OS="Linux"
3342
SUFFIX="so*"
34-
fi
3543

36-
CONFIG="Release"
37-
./build.sh \
44+
./build.sh \
3845
--config $CONFIG \
3946
--build_shared_lib \
4047
--parallel \
@@ -43,6 +50,7 @@ CONFIG="Release"
4350
--allow_running_as_root \
4451
--skip_tests \
4552
--cmake_extra_defines $CMAKE_EXTRA_DEFINES
53+
fi
4654

4755
# copying onnxruntime files
4856
mkdir -p "${PREFIX}"/lib/pkgconfig/

0 commit comments

Comments
 (0)