From e124e8776408a0db499c696ffa38bd25e3d165cf Mon Sep 17 00:00:00 2001 From: Dan Raviv Date: Fri, 2 Jun 2023 13:38:30 -0700 Subject: [PATCH] _juce_get_module_definitions filter excludes entries with escaped semicolons Before this tweak, a juce plugin target which had a target_compile_definitions entry with an escaped semicolon would end up generating format-specific targets which not only had a preprocessor definition matching the entry, but also extraneous definitions of the escaped-semicolon-split parts of that entry. For example, an entry of "MY_MACRO=f()\;g();" would end up with the extraneous preprocessor definitions MY_MACRO=f() and g(), in addition to the desired MY_MACRO=f();g(); This is because of how CMake handles escaped semicolons in lists, see e.g. https://gitlab.kitware.com/cmake/cmake/-/issues/20317 --- extras/Build/CMake/JUCEUtils.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index e806c49afbb9..bab0f1de4e06 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -275,7 +275,7 @@ function(_juce_get_module_definitions target filter out_var) set(compile_defs $>) if(filter) - set(${out_var} $ PARENT_SCOPE) + set(${out_var} $ PARENT_SCOPE) else() set(${out_var} ${compile_defs} PARENT_SCOPE) endif()