Low-Level Installation
Let's learn how we can specify a more complex installation directory structure.
Modern CMake is moving away from the concept of manipulating files directly. Ideally, we'd always add them to a logical target and use that as a higher level of abstraction to represent all the underlying assets: source files, headers, resources, configuration, and so on. The main advantage is the dryness of the code: usually, we won't need to change more than one line to add a file to the target.
Unfortunately, adding every installed file to a target isn't always possible or convenient. For such cases, three choices are available:
install(FILES)
install(PROGRAMS)
install(DIRECTORY)
...