diff --git a/icinga-installer/CMakeLists.txt b/icinga-installer/CMakeLists.txt index 6ac5e1f04..1cd80b513 100644 --- a/icinga-installer/CMakeLists.txt +++ b/icinga-installer/CMakeLists.txt @@ -19,6 +19,10 @@ set_target_properties( FOLDER Bin OUTPUT_NAME icinga2-installer LINK_FLAGS "/SUBSYSTEM:WINDOWS" + + # Use a statically-linked runtime library as this binary is run during the installation process where the other DLLs + # may not have been installed already and the system-provided version may be too old. + MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>" ) target_link_libraries(icinga-installer shlwapi)