Skip to content

Commit deea098

Browse files
committed
cmake: Check for makensis tool before using it
1 parent ee68b05 commit deea098

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/module/Maintenance.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function(add_windows_deploy_target)
4646
if(MINGW AND TARGET bitcoin-qt AND TARGET bitcoind AND TARGET bitcoin-cli AND TARGET bitcoin-tx AND TARGET bitcoin-wallet AND TARGET bitcoin-util AND TARGET test_bitcoin)
4747
# TODO: Consider replacing this code with the CPack NSIS Generator.
4848
# See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
49+
find_program(MAKENSIS_EXECUTABLE makensis REQUIRED)
4950
include(GenerateSetupNsi)
5051
generate_setup_nsi()
5152
add_custom_command(
@@ -58,7 +59,7 @@ function(add_windows_deploy_target)
5859
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-wallet>
5960
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:bitcoin-util>
6061
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
61-
COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
62+
COMMAND ${MAKENSIS_EXECUTABLE} -V2 ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.nsi
6263
VERBATIM
6364
)
6465
add_custom_target(deploy DEPENDS ${PROJECT_BINARY_DIR}/bitcoin-win64-setup.exe)

0 commit comments

Comments
 (0)