build(cmake): add a dragonx_release target that builds only what ships

Release builds ran a plain `cmake --build .`, which builds `all`: on top
of the app and the wallet-rebuild helper, every --*-release run also
compiled HushChatFixtureCheck, ObsidianDragonTests where BUILD_TESTING
is on (Linux, macOS) and, in Lite backend trees, lite_smoke and
lite_send_smoke. None of them ship.

A new `dragonx_release` custom target depends on ObsidianDragon plus
dragonx-wallet-rebuild, copy_langs and copy_themes where those targets
exist, and the three release paths in build.sh build only that target.
The dev build (./build.sh) still builds `all`.

BUILD_TESTING is deliberately left alone: release and dev builds share
build/<platform>, and writing BUILD_TESTING=OFF into that cache would
leave ctest running a stale test binary.

Measured:
- a dry run of dragonx_release schedules none of the test, smoke-tool or
  fixture-CLI builds that `all` schedules, in a full-node, a
  Lite+backend and a mingw tree; the wallet-rebuild helper is still
  built;
- all four release builds (Linux and Windows, full node and Lite) log
  the dragonx_release target and no ObsidianDragonTests build, and the
  Linux zip and AppImage file lists are unchanged.

Consequences: a release run no longer refreshes the test binary or the
lite smoke tools in build/<platform>/bin, so run ./build.sh or
`cmake --build` before ctest, and build the Windows smoke tools with
`--target lite_smoke lite_send_smoke`. If a release step starts copying
another CMake-built file out of bin/, its target must be added to
dragonx_release.

Not verifiable here: macOS --mac-release (the .app should still contain
the app, dragonx-wallet-rebuild and Contents/Resources/res).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 06:05:07 -05:00
co-authored by Claude Opus 5.5
parent 25ceb2cfe1
commit e65be1d24b
2 changed files with 16 additions and 3 deletions
+3 -3
View File
@@ -393,7 +393,7 @@ build_release_linux() {
"${CMAKE_LITE_ARGS[@]}"
info "Building with $JOBS jobs ..."
cmake --build . -j "$JOBS"
cmake --build . -j "$JOBS" --target dragonx_release
[[ -f "bin/${APP_BASENAME}" ]] || { err "Linux build failed"; exit 1; }
@@ -854,7 +854,7 @@ HDR
"${CMAKE_LITE_ARGS[@]}"
info "Building with $JOBS jobs ..."
cmake --build . -j "$JOBS"
cmake --build . -j "$JOBS" --target dragonx_release
[[ -f "bin/${APP_BASENAME}.exe" ]] || { err "Windows build failed"; exit 1; }
# Strip the app exe — the Linux and macOS release paths already strip theirs, and even the Windows
@@ -1150,7 +1150,7 @@ TOOLCHAIN
fi
info "Building with $JOBS jobs ..."
cmake --build . -j "$JOBS"
cmake --build . -j "$JOBS" --target dragonx_release
[[ -f "bin/${APP_BASENAME}" ]] || { err "macOS build failed"; exit 1; }