Skip to content

Commit 73f7526

Browse files
committed
Move flatbuffers to submodule
1 parent cf20ec9 commit 73f7526

20 files changed

Lines changed: 20 additions & 8535 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
[submodule "third_party/pybind11"]
1111
path = third_party/pybind11
1212
url = https://github.com/pybind/pybind11
13+
[submodule "third_party/flatbuffers"]
14+
path = third_party/flatbuffers
15+
url = https://github.com/google/flatbuffers

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ option(DNN_USE_MSVC_STATIC_RUNTIME "Link onnx2daq to msvc static runtime" ON)
1010
option(DNN_CMAKE_INSTALL "Export targets in cmake (disable it for ONNXRuntime)" ON)
1111

1212
include(cmake/system.cmake)
13-
include(cmake/glog.cmake)
1413
include(cmake/common.cmake)
1514

1615
include(cmake/utils.cmake)
1716
dnn_add_msvc_runtime_flag()
1817

18+
include(cmake/glog.cmake)
1919
configure_glog()
2020

21+
include(cmake/flatbuffers.cmake)
22+
configure_flatbuffers()
23+
2124
if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
2225
set (CMAKE_CXX_STANDARD 17)
2326

cmake/flatbuffers.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function(configure_flatbuffers)
2+
option(FLATBUFFERS_BUILD_TESTS "Enable the build of tests and samples." OFF)
3+
option(FLATBUFFERS_BUILD_FLATHASH "Enable the build of flathash" OFF)
4+
option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler"
5+
OFF)
6+
option(FLATBUFFERS_BUILD_FLATLIB "Enable the build of the flatbuffers library"
7+
ON)
8+
add_subdirectory(third_party/flatbuffers)
9+
endfunction()
10+

dnnlibrary/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ find_library(
5454
target_link_libraries(
5555
dnnlibrary
5656
glog::glog
57+
flatbuffers
5758
${android-lib}
5859
${log-lib}
5960
${neural-networks-lib}

include/flatbuffers/base.h

Lines changed: 0 additions & 267 deletions
This file was deleted.

0 commit comments

Comments
 (0)