For x86_64-w64-mingw32 and *-apple-darwin targets, the optional deploy target requires dedicated tools: makensis and zip, respectively.
This PR introduces a uniform checks for those tools when attempting to build the deploy target, ensuring they are not required for configuring and building any other targets.
Here is an example of workflow for x86_64-w64-mingw32:
0$ # `nsis` is not installed
1$ cmake -B build -G "GNU Makefiles" --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
2$ cmake --build build -j $(nproc)
3$ cmake --build build -t deploy
4
5Error: NSIS not found.
6Please install NSIS and/or ensure that its executable is accessible to the find_program() command—
7for example, by setting the MAKENSIS_EXECUTABLE variable or another relevant CMake variable.
8Then re-run cmake to regenerate the build system.
9
10Built target deploy
11$ sudo apt install nsis
12$ cmake -B build
13$ cmake --build build -t deploy
14...
15[100%] Generating bitcoin-win64-setup.exe
16[100%] Built target deploy
Fixes #32018.