Added biicode support via biicode.conf and CMake/biicode.cmake

Change-Id: Id9750cceaa57aad3c969cf12299aa60f21c29074
This commit is contained in:
franramirez688 2015-01-31 11:14:59 -05:00 committed by Wouter van Oortmerssen
parent 36fe9d539f
commit da0f096ba2
3 changed files with 33 additions and 0 deletions

22
CMake/biicode.cmake Normal file
View File

@ -0,0 +1,22 @@
# Initializes block variables
INIT_BIICODE_BLOCK()
# Copying data files to project/bin folder
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/samples")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/samples/monster.fbs"
"${CMAKE_CURRENT_SOURCE_DIR}/samples/monsterdata.json"
DESTINATION
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/samples")
endif()
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/tests"
DESTINATION
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
endif()
# Actually create targets: EXEcutables and libraries.
ADD_BIICODE_TARGETS()
string(REPLACE " " ";" REPLACED_FLAGS ${CMAKE_CXX_FLAGS})
target_compile_options(${BII_BLOCK_TARGET} INTERFACE ${REPLACED_FLAGS})
target_include_directories(${BII_BLOCK_TARGET} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)

View File

@ -74,6 +74,12 @@ if(FLATBUFFERS_CODE_COVERAGE)
"${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage") "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
endif() endif()
if(BIICODE)
# Execute biicode building
include(CMake/biicode.cmake)
return()
endif(BIICODE)
include_directories(include) include_directories(include)
if(FLATBUFFERS_BUILD_FLATC) if(FLATBUFFERS_BUILD_FLATC)

5
biicode.conf Normal file
View File

@ -0,0 +1,5 @@
# Biicode configuration file
[paths]
# Local directories to look for headers (within block)
include