From 1fa60910005556cf9f9f67d89412beb7e918fe57 Mon Sep 17 00:00:00 2001 From: Saman <100295082+enum-class@users.noreply.github.com> Date: Thu, 17 Nov 2022 23:24:48 -0500 Subject: [PATCH] Fix schema to binary test, when build and run from all directories. specially when add to other projects. (#7650) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 395ac59e7..85356ca65 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -585,7 +585,7 @@ function(compile_flatbuffers_schema_to_binary SRC_FBS) OUTPUT ${GEN_BINARY_SCHEMA} COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -b --schema --bfbs-comments --bfbs-builtins - --bfbs-filenames ${SRC_FBS_DIR} + --bfbs-filenames "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS_DIR}" -I "${CMAKE_CURRENT_SOURCE_DIR}/tests/include_test" -o "${SRC_FBS_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FBS}"