install: Add sane set of defaults for COMPONENT parameter
If the user does not specify a COMPONENT for a target type, the install()
command currently uses the value "Unspecified"
.
Documentation and examples of the install(TARGETS)
command use the components "Libraries"
and "Development"
.
Documentation and examples of the install(EXPORT)
command use the components "Runtime"
and "Development"
.
I propose to use the following defaults instead of "Unspecified"
:
-
TARGET ARCHIVE COMPONENT
:"Development"
-
TARGET LIBRARY COMPONENT
:"Runtime"
-
TARGET LIBRARY NAMELINK_COMPONENT
:"Development"
-
TARGET RUNTIME COMPONENT
:"Runtime"
-
EXPORT COMPONENT
:"Development"
Then, drop the COMPONENT
from simple examples. Use the component names "Runtime"
and "Development"
consistently in the documentation.
This is a breaking change for projects that currently expect things to end up in the "Unspecified"
component.
This may require a policy.