Skip to content

Commit

Permalink
Merge pull request #56 from JDAI-CV/3rd_party
Browse files Browse the repository at this point in the history
Move flatbuffers to submodule
  • Loading branch information
daquexian authored Jun 21, 2019
2 parents cf20ec9 + 73f7526 commit 99baa7b
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 8,535 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "third_party/pybind11"]
path = third_party/pybind11
url = https://github.com/pybind/pybind11
[submodule "third_party/flatbuffers"]
path = third_party/flatbuffers
url = https://github.com/google/flatbuffers
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ option(DNN_USE_MSVC_STATIC_RUNTIME "Link onnx2daq to msvc static runtime" ON)
option(DNN_CMAKE_INSTALL "Export targets in cmake (disable it for ONNXRuntime)" ON)

include(cmake/system.cmake)
include(cmake/glog.cmake)
include(cmake/common.cmake)

include(cmake/utils.cmake)
dnn_add_msvc_runtime_flag()

include(cmake/glog.cmake)
configure_glog()

include(cmake/flatbuffers.cmake)
configure_flatbuffers()

if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set (CMAKE_CXX_STANDARD 17)

Expand Down
10 changes: 10 additions & 0 deletions cmake/flatbuffers.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function(configure_flatbuffers)
option(FLATBUFFERS_BUILD_TESTS "Enable the build of tests and samples." OFF)
option(FLATBUFFERS_BUILD_FLATHASH "Enable the build of flathash" OFF)
option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler"
OFF)
option(FLATBUFFERS_BUILD_FLATLIB "Enable the build of the flatbuffers library"
ON)
add_subdirectory(third_party/flatbuffers)
endfunction()

1 change: 1 addition & 0 deletions dnnlibrary/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ find_library(
target_link_libraries(
dnnlibrary
glog::glog
flatbuffers
${android-lib}
${log-lib}
${neural-networks-lib}
Expand Down
267 changes: 0 additions & 267 deletions include/flatbuffers/base.h

This file was deleted.

Loading

0 comments on commit 99baa7b

Please sign in to comment.