From 733ac6415cffb2b47b81e6eb7d2cc4eb5dd0f468 Mon Sep 17 00:00:00 2001 From: Zhipeng Jia Date: Thu, 26 Mar 2020 21:01:34 -0500 Subject: [PATCH] add flatbuffers dep --- .gitmodules | 3 +++ build_deps.sh | 8 ++++++++ deps/flatbuffers | 1 + 3 files changed, 12 insertions(+) create mode 160000 deps/flatbuffers diff --git a/.gitmodules b/.gitmodules index 3644c11..7dbbfad 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "deps/json"] path = deps/json url = https://github.com/nlohmann/json.git +[submodule "deps/flatbuffers"] + path = deps/flatbuffers + url = https://github.com/google/flatbuffers.git diff --git a/build_deps.sh b/build_deps.sh index 47e8872..de14de2 100755 --- a/build_deps.sh +++ b/build_deps.sh @@ -18,6 +18,14 @@ done rm -rf ${DEPS_INSTALL_PATH} mkdir -p ${DEPS_INSTALL_PATH} +# Build flatbuffers +cd $BASE_DIR/deps/flatbuffers && rm -rf build && mkdir -p build && cd build && \ + cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFLATBUFFERS_BUILD_TESTS=OFF -DCMAKE_CXX_STANDARD=11 \ + -DFLATBUFFERS_STATIC_FLATC=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF \ + -DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_PATH} .. && \ + make -j$(nproc) install && \ + rm -rf $BASE_DIR/deps/flatbuffers/build + # Build yaml-cpp cd $BASE_DIR/deps/yaml-cpp && rm -rf build && mkdir -p build && cd build && \ cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DYAML_CPP_BUILD_TESTS=OFF -DCMAKE_CXX_STANDARD=11 \ diff --git a/deps/flatbuffers b/deps/flatbuffers new file mode 160000 index 0000000..6df40a2 --- /dev/null +++ b/deps/flatbuffers @@ -0,0 +1 @@ +Subproject commit 6df40a2471737b27271bdd9b900ab5f3aec746c7