cmake: add and use install_binary_component

Add a separate component for each binary for fine-grained installation options.

Also install the man pages for only for the targets enabled.
This commit is contained in:
Cory Fields
2025-02-11 18:23:44 +00:00
parent 0264c5d86c
commit 2e0c92558e
7 changed files with 40 additions and 40 deletions

View File

@@ -2,6 +2,8 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
include(GNUInstallDirs)
# TODO: libbitcoinkernel is a work in progress consensus engine
# library, as more and more modules are decoupled from the
# consensus engine, this list will shrink to only those
@@ -130,7 +132,6 @@ endif()
configure_file(${PROJECT_SOURCE_DIR}/libbitcoinkernel.pc.in ${PROJECT_BINARY_DIR}/libbitcoinkernel.pc @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/libbitcoinkernel.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" COMPONENT Kernel)
include(GNUInstallDirs)
install(TARGETS bitcoinkernel
RUNTIME
DESTINATION ${CMAKE_INSTALL_BINDIR}