diff --git a/cmake/external/flatbuffers.cmake b/cmake/external/flatbuffers.cmake index 7c6374b40b92a8807c5bb9529d907c576f6ad05c..e6ab31ee855f5bbc0594f37c00a3ec46d8e4231d 100644 --- a/cmake/external/flatbuffers.cmake +++ b/cmake/external/flatbuffers.cmake @@ -94,12 +94,10 @@ function(compile_flatbuffers_schema_to_cpp_opt TARGET SRC_FBS OPT) message(STATUS "SRC_FBS_DIR: ${SRC_FBS_DIR}") string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS}) add_custom_command( - OUTPUT ${GEN_HEADER} + OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/${GEN_HEADER}" COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" --cpp --gen-mutable --gen-object-api --reflect-names - --force-empty --force-empty-vectors ${OPT} - -I "${CMAKE_CURRENT_SOURCE_DIR}/tests/include_test" -o "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}" DEPENDS flatbuffers