File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,17 @@ function(flatcc_generate_sources)
136136 endif ()
137137
138138 set (ABSOLUTE_DEFINITION_FILES)
139+
140+ foreach (definition_file ${FLATCC_DEFINITION_FILES} )
141+ # TODO: file(REAL_PATH) if cmake_minimum_Version >= 3.19
142+ if (IS_ABSOLUTE "${definition_file} " )
143+ set (absolute_def_file "${definition_file} " )
144+ else ()
145+ set (absolute_def_file "${CMAKE_CURRENT_SOURCE_DIR} /${definition_file} " )
146+ endif ()
147+ list (APPEND ABSOLUTE_DEFINITION_FILES "${absolute_def_file} " )
148+ endforeach ()
149+
139150 set (OUTPUT_FILES)
140151 if (FLATCC_OUTFILE)
141152 list (APPEND FLATCC_COMPILE_FLAGS "--outfile=${FLATCC_OUTPUT_DIR} /${FLATCC_OUTFILE} " )
@@ -155,10 +166,6 @@ function(flatcc_generate_sources)
155166 list (APPEND OUTPUT_FILES "${FLATCC_OUTPUT_DIR} /flatbuffers_common_builder.h" )
156167 endif ()
157168 endif ()
158- foreach (definition_file ${FLATCC_DEFINITION_FILES} )
159- file (REAL_PATH "${definition_file} " absolute_def_file)
160- list (APPEND ABSOLUTE_DEFINITION_FILES "${absolute_def_file} " )
161- endforeach ()
162169
163170 message (VERBOSE "Flatcc output directory: ${FLATCC_OUTPUT_DIR} " )
164171 message (VERBOSE "Flatcc output files: ${OUTPUT_FILES} " )
You can’t perform that action at this time.
0 commit comments