Skip to content

Commit

Permalink
add flatbuffers dep
Browse files Browse the repository at this point in the history
  • Loading branch information
zhipeng-jia committed Mar 27, 2020
1 parent 2529f5a commit 733ac64
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions build_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions deps/flatbuffers
Submodule flatbuffers added at 6df40a

0 comments on commit 733ac64

Please sign in to comment.