Made CMakeLists.txt compatible with older versions of CMake.
By replacing DIRECTORY by PATH: http://www.cmake.org/cmake/help/v3.0/command/get_filename_component.html Change-Id: I6f5802deeda53dea443b255294235e43e7bb5389 Tested: on Linux.
This commit is contained in:
parent
ea592296b8
commit
4cdf3eb19b
|
@ -72,7 +72,7 @@ include_directories(include)
|
||||||
add_executable(flatc ${FlatBuffers_Compiler_SRCS})
|
add_executable(flatc ${FlatBuffers_Compiler_SRCS})
|
||||||
|
|
||||||
function(compile_flatbuffers_schema_to_cpp SRC_FBS)
|
function(compile_flatbuffers_schema_to_cpp SRC_FBS)
|
||||||
get_filename_component(SRC_FBS_DIR ${SRC_FBS} DIRECTORY)
|
get_filename_component(SRC_FBS_DIR ${SRC_FBS} PATH)
|
||||||
string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS})
|
string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS})
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${GEN_HEADER}
|
OUTPUT ${GEN_HEADER}
|
||||||
|
|
Loading…
Reference in New Issue