From e6c6065fcec65fc943b7cb5d679ec5f58d845dc2 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Fri, 22 Nov 2024 16:10:25 +0100 Subject: [PATCH] fix(core): fix cmakelists generation [no changelog] --- core/site_scons/tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/site_scons/tools.py b/core/site_scons/tools.py index 43ab398c6d..728b0bccfb 100644 --- a/core/site_scons/tools.py +++ b/core/site_scons/tools.py @@ -52,7 +52,8 @@ def get_defs_for_cmake(defs: list[str | tuple[str, str]]) -> list[str]: result: list[str] = [] for d in defs: if type(d) is tuple: - result.append(d[0] + "=" + d[1]) + val = d[1].replace('"', '\\"').replace("(", "\\(").replace(")", "\\)") + result.append(f'{d[0]}="{val}"') else: result.append(d) return result