Don't re-download NSCP for every build

fixes #9961
This commit is contained in:
Gunnar Beutner 2015-08-18 20:16:22 +02:00
parent da7d04581d
commit 854f8ec918
1 changed files with 9 additions and 1 deletions

View File

@ -281,7 +281,15 @@ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
if(WIN32)
file(DOWNLOAD http://files.nsclient.org/released/NSCP-0.4.3.143-Win32.msi ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi)
set(NSCP_SHA256SUM "")
if (EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi)
file(SHA256 ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi NSCP_SHA256SUM)
endif()
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi OR NOT ${NSCP_SHA256SUM} STREQUAL "226cef0154daf1f9b93d0e168068e723e2be407548e5c4772557401d87535b48")
file(DOWNLOAD http://files.nsclient.org/released/NSCP-0.4.3.143-Win32.msi ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi SHOW_PROGRESS)
endif()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/NSCP-Win32.msi DESTINATION ${CMAKE_INSTALL_SBINDIR})
install(