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
2025-02-18 14:04:31 +00:00
parent db63bfbe7c
commit 026bb226e9
9 changed files with 64 additions and 45 deletions

View File

@@ -255,7 +255,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
for binary, [attribute_name, env_variable_name] in binaries.items():
default_filename = os.path.join(
self.config["environment"]["BUILDDIR"],
"src",
"bin",
binary + self.config["environment"]["EXEEXT"],
)
setattr(self.options, attribute_name, os.getenv(env_variable_name, default=default_filename))
@@ -272,8 +272,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.set_binary_paths()
os.environ['PATH'] = os.pathsep.join([
os.path.join(config['environment']['BUILDDIR'], 'src'),
os.path.join(config['environment']['BUILDDIR'], 'src', 'qt'), os.environ['PATH']
os.path.join(config['environment']['BUILDDIR'], 'bin'),
os.environ['PATH']
])
# Set up temp directory and start logging