File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ endfunction()
44
44
45
45
function (add_windows_deploy_target)
46
46
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)
47
+ find_program (MAKENSIS_EXECUTABLE makensis)
48
+ if (NOT MAKENSIS_EXECUTABLE)
49
+ add_custom_target (deploy
50
+ COMMAND ${CMAKE_COMMAND} -E echo "Error: NSIS not found"
51
+ )
52
+ return ()
53
+ endif ()
54
+
47
55
# TODO: Consider replacing this code with the CPack NSIS Generator.
48
56
# See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
49
57
include (GenerateSetupNsi)
@@ -58,7 +66,7 @@ function(add_windows_deploy_target)
58
66
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-wallet> -o ${PROJECT_BINARY_DIR} /release/$<TARGET_FILE_NAME:bitcoin-wallet>
59
67
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:bitcoin-util> -o ${PROJECT_BINARY_DIR} /release/$<TARGET_FILE_NAME:bitcoin-util>
60
68
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
69
+ COMMAND ${MAKENSIS_EXECUTABLE} -V2 ${PROJECT_BINARY_DIR} /bitcoin-win64-setup.nsi
62
70
VERBATIM
63
71
)
64
72
add_custom_target (deploy DEPENDS ${PROJECT_BINARY_DIR} /bitcoin-win64-setup.exe)
You can’t perform that action at this time.
0 commit comments