Adds component names to the CMake install targets to allow for component-based installs. Such installs are helpful when a user only wants to install bitcoind
or bitcoin-cli
executables specifically, for example.
At present, the component names use Pascal case to follow the existing convention for the only pre-existing named component Kernel
, however, there is a convincing case to be made for using kebab-case to more intuitively match the names of the executable binaries.
Component based installs can be performed using:
0cmake -B build
1cmake --build build --target bitcoind bitcoin-cli
2cmake --install build --component BitcoinD BitcoinCli
Supported targets:
BitcoinWallet
BitcoinD
BitcoinNode
BitcoinCli
BitcoinTx
BitcoinUtil
Attempts to close #31745.
Possible improvements:
- Scour other nested
CMakeLists.txt
files for additional targets. - Switch to kebab-case
New contributor here; new to Bitcoin, new to CMake, happy to help, learn and receive feedback.
Currently submitted as a draft to inspect build results as a PoC.