1# Downloads the declared version of flatbuffers source code and builds it.
2
3include(ExternalProject)
4
5### Download, configure and build flatbuffers ####################################
6ExternalProject_Add(flatbuffers
7  GIT_REPOSITORY ${_git_repo}
8  GIT_TAG ${_git_rev}
9  PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/fix_warnings.patch
10  CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/install -D FLATBUFFERS_BUILD_TESTS=OFF
11  INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/install
12  INSTALL_COMMAND $(MAKE) install
13          COMMAND ${CMAKE_COMMAND} -E echo "" > <INSTALL_DIR>/CMakeLists.txt
14)
15
16# cbdeps boilerplate
17_ADD_PACKAGE_STEP()
18