From d5a2e8e7975bc738312c11c2ea2ead133473c1a1 Mon Sep 17 00:00:00 2001 From: LAK132 Date: Sat, 11 Nov 2023 23:29:33 +1030 Subject: [PATCH] Fix file list issues when trying to build with meson via cmake (cherry picked from commit 39c139c8143d3dfb1595ea812f1cf0c08ef9b4fe) --- CMakeLists.txt | 1 + binding_generator.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf09ba3b..1076e8f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,6 +132,7 @@ endif() execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import binding_generator; binding_generator.print_file_list(\"${GODOT_GDEXTENSION_API_FILE}\", \"${CMAKE_CURRENT_BINARY_DIR}\", headers=True, sources=True)" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE GENERATED_FILES_LIST + OUTPUT_STRIP_TRAILING_WHITESPACE ) add_custom_command(OUTPUT ${GENERATED_FILES_LIST} diff --git a/binding_generator.py b/binding_generator.py index 18db9fd0..d11d4bba 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -135,9 +135,7 @@ def get_file_list(api_filepath, output_dir, headers=False, sources=False): def print_file_list(api_filepath, output_dir, headers=False, sources=False): - end = ";" - for f in get_file_list(api_filepath, output_dir, headers, sources): - print(f, end=end) + print(*get_file_list(api_filepath, output_dir, headers, sources), sep=";", end=None) def scons_emit_files(target, source, env):