Skip to content

Commit 28da0a9

Browse files
committed
Save onnxruntime files after building
1 parent bce71f9 commit 28da0a9

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packaging/debian_3rdparty/build_onnx.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ OS=$(uname -s)
2727
if [ "$OS" = "Darwin" ]; then
2828
DIR_OS="MacOS"
2929
CMAKE_EXTRA_DEFINES+=' CMAKE_OSX_ARCHITECTURES="arm64"'
30+
SUFFIX="${LIBONNXRUNTIME_VERSION}.dylib"
3031
else
3132
DIR_OS="Linux"
33+
SUFFIX="so.${LIBONNXRUNTIME_VERSION}"
3234
fi
3335

3436
CONFIG="Release"
@@ -42,9 +44,16 @@ CONFIG="Release"
4244
--skip_tests \
4345
--cmake_extra_defines $CMAKE_EXTRA_DEFINES
4446

45-
# copying .pc file
47+
# copying onnxruntime files
4648
mkdir -p "${PREFIX}"/lib/pkgconfig/
47-
cp -r build/$DIR_OS/$CONFIG/libonnxruntime.* ${PREFIX}/lib/pkgconfig/
49+
mkdir -p "${PREFIX}"/include/onnxruntime/
50+
51+
cp build/$DIR_OS/$CONFIG/libonnxruntime.pc ${PREFIX}/lib/pkgconfig/
52+
cp build/$DIR_OS/$CONFIG/libonnxruntime.$SUFFIX ${PREFIX}/lib/
53+
cp include/onnxruntime/core/session/onnxruntime_cxx_inline.h ${PREFIX}/include/onnxruntime/
54+
cp include/onnxruntime/core/session/onnxruntime_float16.h ${PREFIX}/include/onnxruntime/
55+
cp include/onnxruntime/core/session/onnxruntime_c_api.h ${PREFIX}/include/onnxruntime/
56+
cp include/onnxruntime/core/session/onnxruntime_cxx_api.h ${PREFIX}/include/onnxruntime/
4857

4958
cd ../..
5059
rm -fr tmp

0 commit comments

Comments
 (0)