Skip to content

Commit

Permalink
_juce_get_module_definitions filter excludes entries with escaped sem…
Browse files Browse the repository at this point in the history
…icolons

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
  • Loading branch information
danra committed Jun 2, 2023
1 parent 82377a7 commit e124e87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extras/Build/CMake/JUCEUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function(_juce_get_module_definitions target filter out_var)
set(compile_defs $<TARGET_GENEX_EVAL:${target},$<TARGET_PROPERTY:${target},COMPILE_DEFINITIONS>>)

if(filter)
set(${out_var} $<FILTER:${compile_defs},EXCLUDE,JucePlugin_Build_|JUCE_SHARED_CODE> PARENT_SCOPE)
set(${out_var} $<FILTER:${compile_defs},EXCLUDE,JucePlugin_Build_|JUCE_SHARED_CODE|\;> PARENT_SCOPE)
else()
set(${out_var} ${compile_defs} PARENT_SCOPE)
endif()
Expand Down

0 comments on commit e124e87

Please sign in to comment.