cmake: Set top-level target output locations

This change:
1. Collects build artifacts in dedicated locations.
2. Allows running bitcoin-chainstate.exe with bitcoinkernel.dll directly
from the build tree on Windows.
This commit is contained in:
Hennadii Stepanov committed 2025-02-20 22:18:51 +00:00
1 parent db63bfbe7c
commit 026bb226e9
9 files changed
+64 -45

No files matched your search

+4 -4
View File
@@ -8,10 +8,10 @@ declare -A LIBS
LIBS[cli]="libbitcoin_cli.a"
LIBS[common]="libbitcoin_common.a"
LIBS[consensus]="libbitcoin_consensus.a"
LIBS[crypto]="crypto/libbitcoin_crypto.a"
LIBS[crypto]="libbitcoin_crypto.a"
LIBS[node]="libbitcoin_node.a"
LIBS[util]="util/libbitcoin_util.a"
LIBS[wallet]="wallet/libbitcoin_wallet.a"
LIBS[util]="libbitcoin_util.a"
LIBS[wallet]="libbitcoin_wallet.a"
# Declare allowed dependencies "X Y" where X is allowed to depend on Y. This
# list is taken from doc/design/libraries.md.
@@ -187,7 +187,7 @@ fi
# shellcheck disable=SC2046
cmake --build "$BUILD_DIR" -j"$(nproc)" -t $(lib_targets)
TEMP_DIR="$(mktemp -d)"
cd "$BUILD_DIR/src"
cd "$BUILD_DIR/lib"
extract_symbols "$TEMP_DIR"
if check_libraries "$TEMP_DIR"; then
echo "Success! No unexpected dependencies were detected."