Commit 5d42c835 authored by Keef Aragon's avatar Keef Aragon Committed by Wouter van Oortmerssen

Set Working Directory for flatc commands (#4737)

parent 7c1203d4
...@@ -71,6 +71,8 @@ function(build_flatbuffers flatbuffers_schemas ...@@ -71,6 +71,8 @@ function(build_flatbuffers flatbuffers_schemas
) )
endif() endif()
set(working_dir "${CMAKE_CURRENT_SOURCE_DIR}")
set(schema_glob "*.fbs") set(schema_glob "*.fbs")
# Generate the include files parameters. # Generate the include files parameters.
set(include_params "") set(include_params "")
...@@ -97,7 +99,8 @@ function(build_flatbuffers flatbuffers_schemas ...@@ -97,7 +99,8 @@ function(build_flatbuffers flatbuffers_schemas
-o ${generated_includes_dir} -o ${generated_includes_dir}
${include_params} ${include_params}
-c ${schema} -c ${schema}
DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies}) DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies}
WORKING_DIRECTORY "${working_dir}")
list(APPEND all_generated_files ${generated_include}) list(APPEND all_generated_files ${generated_include})
endif() endif()
...@@ -109,7 +112,8 @@ function(build_flatbuffers flatbuffers_schemas ...@@ -109,7 +112,8 @@ function(build_flatbuffers flatbuffers_schemas
-o ${binary_schemas_dir} -o ${binary_schemas_dir}
${include_params} ${include_params}
${schema} ${schema}
DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies}) DEPENDS ${FLATC_TARGET} ${schema} ${additional_dependencies}
WORKING_DIRECTORY "${working_dir}")
list(APPEND all_generated_files ${binary_schema}) list(APPEND all_generated_files ${binary_schema})
endif() endif()
......
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