tutorial step 12: installation issue

Hi,

I’ve got the impression that the mentioned tutorial is dealing only with packaging two configurations of a project. But if I try to install them, by calling cmake --install . first from the Step12/debug directory, then from the Step12/release one, I see that all configurations files, whose name does not depend on the build type, are overwritten, which is probably not the desired behavior.

What would be the correct way to install and export different configuration of the same targets?

Besides, the proposed CPack command line seems to use the same CPack generated configuration file to generate both configurations but I don’t see any logic, in the CPack tutorial, that is specific to the build type. Actually the only logic that is coded is the definition of the version number and the licence.
I don’t really like to rely on black magic :wink: and I would appreciate to understand a bit more how CPack is dealing with different build types, or even other type of configuration (I’m contemplating to managed more than debug/release configuration but also compiler dependent one, for instance).
(Actually this paragraph is nearly an independent topic by itself).

Regards,
A.