Skip to content

Help: clarify DESTINATION and TYPE usage for install()

Corrects a few inaccuracies and tightens up wording around the new default destination and file type functionality of the install() command. Key points:

  • Updated the synopsis to remove the DESTINATION keywords now that the logic around whether they are needed is less straightforward. Since TYPE can now be used instead of DESTINATION in some cases, having DESTINATION in the synopsis could be confusing. All forms shown in the synopsis now have consistency in only showing the first keyword and deferring all other options to the detailed sections.
  • Either DESTINATION or TYPE must be provided for install(FILES) and install(DIRECTORY). The command signatures could have been interpreted as implying you could omit both.
  • If non-standard destinations are specified, they should still ideally start with one of the GNUInstallDirs variables, not just simply contain one.
  • Prefer "project" to "you" and similar wording.

Merge request reports