forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#31844: cmake: add a component for each binary
9b033be cmake: rename Kernel component to bitcoinkernel for consistency (Cory Fields) 2e0c925 cmake: add and use install_binary_component (Cory Fields) 0264c5d cmake: use per-target components for bitcoin-qt and bitcoin-gui (Cory Fields) fb0546b ci: don't try to install for a fuzz build (Cory Fields) Pull request description: This makes it possible to build/install only the desired binaries regardless of the configuration. For consistency, the component names match the binary names. `Kernel` and `GUI` have been renamed. Additionally it fixes bitcoin#31762 by installing only the manpages for the configured targets (and includes them in the component installs for each). Also fixes bitcoin#31745. Alternative to bitcoin#31765 which is (imo) more correct/thorough. Can be tested using (for ex): ```bash $ cmake -B build $ cmake --build build -t bitcoind -t bitcoin-cli $ cmake --install build --component bitcoind $ cmake --install build --component bitcoin-cli ``` ACKs for top commit: hebasto: ACK 9b033be. TheCharlatan: Re-ACK 9b033be stickies-v: re-ACK 9b033be Tree-SHA512: fd4818e76f190dbeafbf0c246b466f829771902c9d6d7111ed917093b811c8a5536a4a45e20708f73e7f581d6cb77c8e61cfa69e065788dcf0886792f553a355
- Loading branch information
Showing
10 changed files
with
48 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) 2025-present The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or https://opensource.org/license/mit/. | ||
|
||
include_guard(GLOBAL) | ||
include(GNUInstallDirs) | ||
|
||
function(install_binary_component component) | ||
cmake_parse_arguments(PARSE_ARGV 1 | ||
IC # prefix | ||
"HAS_MANPAGE" # options | ||
"" # one_value_keywords | ||
"" # multi_value_keywords | ||
) | ||
set(target_name ${component}) | ||
install(TARGETS ${target_name} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
COMPONENT ${component} | ||
) | ||
if(INSTALL_MAN AND IC_HAS_MANPAGE) | ||
install(FILES ${PROJECT_SOURCE_DIR}/doc/man/${target_name}.1 | ||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 | ||
COMPONENT ${component} | ||
) | ||
endif() | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters