mirror of
https://github.com/slint-ui/slint.git
synced 2025-12-23 09:19:32 +00:00
If you try to pass multiple files into slint_target_sources, some generators may complain with a strange error like this: ninja: error: build.ninja:226: multiple rules generate slint_generated_dialog_1.cpp The reason for this was how the macro worked (and CMake scoping rules.) While putting together the list of .cpp files to generate - which is 1 by default but is user-configurable - we append a list called cpp_num. However we don't *reset* this list variable, so in each foreach iteration we kept appending a new .cpp file and thus telling CMake we were generating "slint_generated_dialog_1.cpp" twice, in addition to whatever other file you had. We don't hit this issue with the other variables like translation_domain_prop because they're set on every iteration. The fix for this is simple though, we can just set the variable to empty. |
||
|---|---|---|
| .. | ||
| SlintConfig.cmake.in | ||
| SlintMacro.cmake | ||