HomePhabricator

[CMAKE] Allow for component based installation

Description

[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

Details

Provenance
FabienAuthored on Jan 29 2020, 13:10
FabienPushed on Jan 29 2020, 18:53
Reviewer
Restricted Project
Differential Revision
D5099: [CMAKE] Allow for component based installation
Parents
rABC634d0f02c5c0: [CMAKE] Minor improvements to the install_shared_library function
Branches
Unknown
Tags
Unknown