bitcoin/cmake/module
merge-script d61a847af0
Merge bitcoin/bitcoin#32019: cmake: Check for makensis and zip tools before using them for optional deploy targets
1f9b2e150c cmake: Require `zip` only for `deploy` target (Hennadii Stepanov)
0aeff29951 cmake: Check for `makensis` tool before using it (Hennadii Stepanov)

Pull request description:

  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`:
  ```
  $ # `nsis` is not installed
  $ cmake -B build -G "GNU Makefiles" --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
  $ cmake --build build -j $(nproc)
  $ cmake --build build -t deploy

  Error: NSIS not found.
  Please install NSIS and/or ensure that its executable is accessible to the find_program() command—
  for example, by setting the MAKENSIS_EXECUTABLE variable or another relevant CMake variable.
  Then re-run cmake to regenerate the build system.

  Built target deploy
  $ sudo apt install nsis
  $ cmake -B build
  $ cmake --build build -t deploy
  ...
  [100%] Generating bitcoin-win64-setup.exe
  [100%] Built target deploy
  ```

  Fixes https://github.com/bitcoin/bitcoin/issues/32018.

ACKs for top commit:
  hodlinator:
    re-ACK 1f9b2e150c
  fanquake:
    ACK 1f9b2e150c

Tree-SHA512: 5e2bd28a13bd8fa7c4ba8cf1756d200a4651afe83c463d76ece10027cca343e124eff97012a5368028f761df60f420ab891106b4e33b50045051d57c7464ff98
2025-03-18 17:10:40 +08:00
..
AddBoostIfNeeded.cmake cmake: scope Boost Test check to vcpkg 2024-09-05 16:15:27 +01:00
AddWindowsResources.cmake cmake: Add AddWindowsResources module 2024-08-16 21:19:11 +01:00
CheckLinkerSupportsPIE.cmake cmake: Refer to the configure log instead of printing PIE test error 2025-01-23 15:38:36 +00:00
CheckSourceCompilesWithFlags.cmake scripted-diff: Rename CMake helper module 2025-02-20 12:39:20 +00:00
FindBerkeleyDB.cmake cmake: Add wallet functionality 2024-08-16 19:27:40 +01:00
FindLibevent.cmake cmake, refactor: Move HAVE_EVHTTP_... to libevent interface 2024-11-06 15:40:42 +00:00
FindQRencode.cmake cmake: Add FindQRencode module 2024-11-05 16:38:19 +00:00
FindQt.cmake cmake: Avoid hardcoding Qt's major version in Find module 2024-10-01 13:43:30 +01:00
FindUSDT.cmake tracing: dedup TRACE macros & rename to TRACEPOINT 2024-10-28 14:23:47 +01:00
FindZeroMQ.cmake cmake: Add FindZeroMQ module 2024-10-25 18:09:36 +01:00
FlagsSummary.cmake build: Print CMAKE_CXX_COMPILER_ARG1 in summary 2024-09-06 21:59:52 +01:00
GenerateSetupNsi.cmake build: Rename PACKAGE_* variables to CLIENT_* 2024-10-28 12:35:55 +00:00
GetTargetInterface.cmake cmake: Print compiler and linker flags in summary 2024-08-16 19:27:36 +01:00
InstallBinaryComponent.cmake cmake: add and use install_binary_component 2025-02-13 18:14:41 +00:00
Maintenance.cmake Merge bitcoin/bitcoin#32019: cmake: Check for makensis and zip tools before using them for optional deploy targets 2025-03-18 17:10:40 +08:00
ProcessConfigurations.cmake build: set build type and per-build-type flags as early as possible 2025-02-10 21:51:22 +00:00
TargetDataSources.cmake cmake: Add support for builtin codegen target 2025-02-21 11:11:30 +00:00
TestAppendRequiredLibraries.cmake scripted-diff: Rename CMake helper module 2025-02-20 12:39:20 +00:00
TryAppendCXXFlags.cmake cmake: Fix IF_CHECK_PASSED option handling 2024-11-06 08:59:15 +00:00
TryAppendLinkerFlag.cmake cmake: Fix IF_CHECK_PASSED option handling 2024-11-06 08:59:15 +00:00
WarnAboutGlobalProperties.cmake cmake: Introduce interface libraries to encapsulate common flags 2024-08-16 19:27:34 +01:00