diff --git a/CMakeLists.txt b/CMakeLists.txt index 7db4ac2..89b7a85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1139,6 +1139,19 @@ else() message(STATUS "wallet-rebuild helper: OFF (no Berkeley DB found; set DRAGONX_BDB_ROOT for release builds)") endif() +# Release packaging (build.sh --linux-release / --win-release / --mac-release) builds ONLY what ships: +# cmake --build . --target dragonx_release +# The test binary, the lite smoke tools and the dev CLIs are skipped WITHOUT writing BUILD_TESTING=OFF into the +# build/ cache that dev builds share. A stale OFF would leave ctest running an old test binary. +# If a release path starts copying a new CMake-built file out of bin/, add its target here. +add_custom_target(dragonx_release) +add_dependencies(dragonx_release ObsidianDragon) +foreach(_dragonx_release_dep dragonx-wallet-rebuild copy_langs copy_themes) + if(TARGET ${_dragonx_release_dep}) + add_dependencies(dragonx_release ${_dragonx_release_dep}) + endif() +endforeach() + # ----------------------------------------------------------------------------- # fake_dragonxd — a deliberately slow, scriptable dragonxd stand-in that reproduces the daemon-stop # incident (usage and the incident it models: tools/fake_dragonxd/README.md). diff --git a/build.sh b/build.sh index 74a9df5..26097c6 100755 --- a/build.sh +++ b/build.sh @@ -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; }