File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
tests/loader_test/test_runtimes Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,19 @@ def main(argv):
4545 elif opt in ("-b" , "--bad" ):
4646 generate_badjson_jsons = True
4747
48+ file_text = '{\n '
49+ file_text += ' "file_format_version": "%s",\n ' % cur_runtime_json_version
50+ file_text += ' "runtime": {\n '
51+ file_text += ' "library_path": "%s",\n ' % library_location
52+ file_text += ' "functions": {\n '
53+ file_text += ' "xrNegotiateLoaderRuntimeInterface":\n '
54+ file_text += ' "xrNegotiateLoaderRuntimeInterface"\n '
55+ file_text += ' }\n '
56+ file_text += ' }\n '
57+ file_text += '}\n '
58+ with open (output_file , 'w' ) as f :
59+ f .write (file_text )
60+
4861 if generate_badjson_jsons :
4962 # Bad File format versions
5063 ####################################
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ set_target_properties(test_runtime PROPERTIES FOLDER ${TESTS_FOLDER})
3434add_dependencies (test_runtime
3535 xr_global_generated_files
3636 generate_openxr_header
37- generated_rt_json_files
3837)
3938target_include_directories (test_runtime
4039 PRIVATE ${PROJECT_SOURCE_DIR} /src
@@ -85,8 +84,5 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
8584 )
8685endif ()
8786
88- add_custom_target (generated_rt_json_files DEPENDS
89- ${PROJECT_BINARY_DIR} /src/tests/loader_test/resources/runtimes/test_runtime.json
90- )
91- set_target_properties (generated_rt_json_files PROPERTIES FOLDER ${CODEGEN_FOLDER} )
92-
87+ # Add generated file to our sources so we depend on it, and thus trigger geenration.
88+ target_sources (test_runtime PRIVATE ${PROJECT_BINARY_DIR} /src/tests/loader_test/resources/runtimes/test_runtime.json)
You can’t perform that action at this time.
0 commit comments