summaryrefslogtreecommitdiff
path: root/0001-use-system-Flatbuffers.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-use-system-Flatbuffers.patch')
-rw-r--r--0001-use-system-Flatbuffers.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/0001-use-system-Flatbuffers.patch b/0001-use-system-Flatbuffers.patch
new file mode 100644
index 0000000..c172c82
--- /dev/null
+++ b/0001-use-system-Flatbuffers.patch
@@ -0,0 +1,34 @@
+From 6af43995de7e860560b9ebfafb854d7eacf27b32 Mon Sep 17 00:00:00 2001
+From: binsz <274620705z@gmail.com>
+Date: Tue, 30 Jan 2024 22:55:45 +0800
+Subject: [PATCH] use system Flatbuffers
+
+---
+ cmake/external/onnxruntime_external_deps.cmake | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake
+index 8e412c7..1e971e5 100644
+--- a/cmake/external/onnxruntime_external_deps.cmake
++++ b/cmake/external/onnxruntime_external_deps.cmake
+@@ -103,7 +103,7 @@ FetchContent_Declare(
+ URL ${DEP_URL_flatbuffers}
+ URL_HASH SHA1=${DEP_SHA1_flatbuffers}
+ PATCH_COMMAND ${ONNXRUNTIME_FLATBUFFERS_PATCH_COMMAND}
+- FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES Flatbuffers
++ FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES FlatBuffers
+ )
+
+ # Download a protoc binary from Internet if needed
+@@ -342,6 +342,8 @@ namespace std { using ::getenv; }
+ target_compile_options(flatc PRIVATE /FI${CMAKE_BINARY_DIR}/gdk_cstdlib_wrapper.h)
+ endif()
+ endif()
++else()
++ add_library(flatbuffers::flatbuffers ALIAS flatbuffers::flatbuffers_shared)
+ endif()
+
+ if (onnxruntime_BUILD_UNIT_TESTS)
+--
+2.41.0
+