[CMake][NFC] Support cmake install components for targets with multiple target files #26193
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.
The major change here is a follow up to #24168, in which I added support to the build system to use cmake's component system for installation. The only major change is making sure that the installation rules are correct for installing targets with multiple output files.
When installing a target, you could have multiple target files with
different rules for installation. For example, you can specify rules for
RUNTIME
files (binaries, dlls),LIBRARY
files (dylibs, shared objects),ARCHIVE
files, etc.Each of these can take several options, e.g.
DESTINATION
. When you want to specifythe install component for a target, each of the different target file
rules need to have their own
COMPONENT
field. If not, they end up as"Unspecified" which means they will not get installed with the
associated swift component.
cc @compnerd @gottesmm @Rostepher