flatbuffers/cmake: move build_flatbuffers to a standalone file

So that it could be included from both flatbuffers CMakeLists.txt and
FindFlatBuffers.cmake.

Change-Id: Ie16a879beef9367cd6fd9b2d2157044841a7cdbc
This commit is contained in:
Johan Euphrosine
2015-11-17 13:39:37 -08:00
parent 097797bf9f
commit 331d2d835c
3 changed files with 147 additions and 118 deletions

View File

@@ -24,6 +24,8 @@
# for the given flatbuffer schema files.
# Returns the header files in ${Name}_OUTPUTS
set(FLATBUFFERS_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc)
find_path(FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h)
@@ -54,3 +56,5 @@ if(FLATBUFFERS_FOUND)
else()
set(FLATBUFFERS_INCLUDE_DIR)
endif()
include("${FLATBUFFERS_CMAKE_DIR}/BuildFlatBuffers.cmake")