Convention for install component names

The install command supports passing the COMPONENT option.

The book Mastering CMake references suggest to use title case referencing Runtime and Development.

The documentation suggests different conventions (either lower or title case):

Historically, component names like Runtime, RuntimeLibraries and Development have been used, the following search queries help get an idea of how adopted this “convention” is wide-spread:

Next step

To reduce confusion and streamline maintenance, I suggest we work on the following;

  • update the CMake documentation and book to be consistent
  • consider adding a policy to consider component like “Runtime” or “runtime” to be the same ?

Components vary from project to project and are inconsistent enough that I don’t know that we’ll ever get a handle on it. For example, @kyle.edwards has an old MR to make each VTK module have its own set of components (this was to help facilitate per-module Debian packaging).

I think getting the documentation to be consistent is fine, but I don’t think a policy to make components case-insensitive or to push developers to one style or another makes much sense. Any involved use of components will likely require more intimate knowledge of the project than we’d be able to cover with any default behavior (e.g., dependencies among them, optional ones, etc.).

FWIW, my Professional CMake book uses Runtime and Development, or project-specific variations of those. For a deeper discussion though, I recommend you take a look at Issue 22699 which proposes some default component names for install(TARGETS). It takes into consideration the need to separate components of different projects and touches on the complex but closely related topic of namespaces.