]> granicus.if.org Git - icinga2/commitdiff
Don't re-download NSCP for every build
authorGunnar Beutner <gunnar@beutner.name>
Tue, 18 Aug 2015 18:16:22 +0000 (20:16 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 24 Aug 2015 11:38:55 +0000 (13:38 +0200)
fixes #9961

CMakeLists.txt

index d1ff9b0e6b215eedde6bf9105c815d9f664d52ec..2723c432ccc0fdea81e25fbaf8c2c305c66db575 100644 (file)
@@ -251,7 +251,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(