From 0bb5b6f584629f04a5722cadbe834caae6ca594f Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gunnar@beutner.name>
Date: Sat, 19 Apr 2014 02:05:54 +0200
Subject: [PATCH] Install runtime libraries in sbin on Windows.

Refs #4865
---
 CMakeLists.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4470a8289..97306213a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,14 @@ if(MSVC)
   set(CPACK_NSIS_EXECUTABLES_DIRECTORY "sbin")
   set(CPACK_PACKAGE_EXECUTABLES "Icinga2SetupAgent;Icinga 2 Agent Wizard")
   set(CPACK_NSIS_MUI_FINISHPAGE_RUN "Icinga2SetupAgent")
+
+  set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
   include(InstallRequiredSystemLibraries)
+
+  install(
+    PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
+    DESTINATION ${CMAKE_INSTALL_SBINDIR}
+  )
 endif()
 
 include(CPack)