[CMAKE] Allow for component based installation
Summary:
This diff adds the COMPONENT property to the install targets.
This property is set to the current project name, which implies that
bitcoin-cli and bitcoin-tx are part of the bitcoind component.
This can be changed in the future if desired. The man pages are
installed alongside to the related component.
This does not change the behavior of ninja install as the install
target defaults to installing all the components.
Test Plan:
mkdir install cmake -GNinja .. -DCMAKE_INSTALL_PREFIX=install ninja cmake -DCOMPONENT=bitcoind -P cmake_install.cmake
Check that bitcoind, bitcoin-cli, bitcoin-tx and
libbitcoinconsensus and their documentation are installed.
cmake -DCOMPONENT=bitcoin-qt -P cmake_install.cmake
Check that bitcoinqt, and its documentation are installed.
cmake -DCOMPONENT=bitcoin-seeder -P cmake_install.cmake
Check that bitcoin-seeder is installed.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5099