mirror of
https://github.com/namecoin/namecoin-core
synced 2025-10-06 00:22:46 +02:00
This change moves binaries that are not typically invoked directly by users from the `bin/` directory to the `libexec/` directory in CMake installs and binary releases. The goal is to simplify the contents of `bin/` for end users while still making all binaries available when needed. After this change, the binaries remaining in `bin/` are: - bitcoin - bitcoin-cli - bitcoind - bitcoin-qt - bitcoin-tx - bitcoin-util - bitcoin-wallet And the binaries that are moved to `libexec/` are: - bench_bitcoin - bitcoin-chainstate(*) - bitcoin-gui(***) - bitcoin-node(***) - test_bitcoin(**) - test_bitcoin-qt (*) bitcoin-chainstate was previously missing an install rule and was actually not installed even when it was enabled. (**) test_bitcoin is the only libexec/ binary that is currently included in bitcoin binary releases. The others are only installed when building from source with relevant cmake options enabled. (***) bitcoin-node and bitcoin-gui are not currently built by default or included in binary releases but both of these changes are planned and implemented in #31802
32 lines
981 B
CMake
32 lines
981 B
CMake
# 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;INTERNAL" # options
|
|
"" # one_value_keywords
|
|
"" # multi_value_keywords
|
|
)
|
|
set(target_name ${component})
|
|
if(IC_INTERNAL)
|
|
set(runtime_dest ${CMAKE_INSTALL_LIBEXECDIR})
|
|
else()
|
|
set(runtime_dest ${CMAKE_INSTALL_BINDIR})
|
|
endif()
|
|
install(TARGETS ${target_name}
|
|
RUNTIME DESTINATION ${runtime_dest}
|
|
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()
|