Lagom+CMake: Properly propagate dependencies for generated custom targets #15659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have logic for serenity_generated_sources which works well for source
files that are specified in GENERATED_SOURCES prior to calling serenity_lib
or serenity_bin. However, code generated with invoke_generator, and the LibWeb
generators do not always follow the pattern of the IDL and GML files.
For the LibWeb generators, we can just add_dependencies to LibWeb at the time
we declare the generate_Foo custom target. However for LibLocale, LibTimeZone,
and LibUnicode, we don't have the name of the target available, so export the
name in a variable to set into GENERATED_SOURCES.
To make this work for Lagom, we need to make sure that lagom_lib and lagom_bin
call serenity_generated_sources(${target}).
This enables the Xcode generator on macOS hosts, at least for Lagom.