Commit 3de82050 authored by Rene Fichter's avatar Rene Fichter

Fix build error when flatc binary is missing in PATH.

parent 63b526db
...@@ -119,7 +119,7 @@ function(compile_flatbuffers_schema_to_cpp SRC_FBS) ...@@ -119,7 +119,7 @@ function(compile_flatbuffers_schema_to_cpp SRC_FBS)
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}
COMMAND flatc -c --no-includes --gen-mutable -o "${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}" COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable -o "${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
DEPENDS flatc) DEPENDS flatc)
endfunction() endfunction()
...@@ -128,7 +128,7 @@ function(compile_flatbuffers_schema_to_binary SRC_FBS) ...@@ -128,7 +128,7 @@ function(compile_flatbuffers_schema_to_binary SRC_FBS)
string(REGEX REPLACE "\\.fbs$" ".bfbs" GEN_BINARY_SCHEMA ${SRC_FBS}) string(REGEX REPLACE "\\.fbs$" ".bfbs" GEN_BINARY_SCHEMA ${SRC_FBS})
add_custom_command( add_custom_command(
OUTPUT ${GEN_BINARY_SCHEMA} OUTPUT ${GEN_BINARY_SCHEMA}
COMMAND flatc -b --schema -o "${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}" COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -b --schema -o "${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"
DEPENDS flatc) DEPENDS flatc)
endfunction() endfunction()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment