[CMAKE] Install stripped and debug parts of targets
Summary:
This diff adds new targets to install stripped versions of the targets
along with their debug symbols. The install-<component>-debug installs
such files for a single component while install-debug applies it to
all the targets.
The components installed via the install-* targets are now always
copied, even if there is no change. This minor incovenience ensures that
there is no way to split a binary twice, which would lead to empty debug
symbols.
This is not available on OSX for now as the split-debug.sh script
needs to be adapted (the strip arguments differ on OSX).
Depends on D7236.
Test Plan:
For Linux and Windows:
ninja install-bitcoind-debug
Check the binaries/libs are stripped and the debug symbols available
with them.
ninja install-bitcoind-debug
Check the result is identical.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D7239