Merge pull request #10478 from Icinga/windows-installer-compat

icinga-installer: statically link MSVC runtime library on CMake 3.15+
This commit is contained in:
Alexander Aleksandrovič Klimov 2025-06-16 14:22:31 +02:00 committed by GitHub
commit cbff5c5179
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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$<$<CONFIG:Debug>:Debug>"
)
target_link_libraries(icinga-installer shlwapi)