• Vladislav Vaintroub's avatar
    MDEV-17279 Windows : link C runtime dynamically · f4cdf90d
    Vladislav Vaintroub authored
    Changed the build to use /MD flag so that DDL version of C runtime is used.
    
    To make sure MariaDB is always runnable on target system, include
    redistributable CRT libraries into installer.
    
    For MSI package, use Microsoft's merge modules.
    For ZIP  use "applocal" approach,i.e place redistributable dlls
    into the bin directory of the package(via InstallRequiredSystemLibraries
    cmake module) The space overhead of libraries in negligible, ~ 3MB unpacked.
    
    There are 2 cases, where we still link C runtime statically
    
    - Upgrade wizard, it uses MFC, and we link statically to avoid
    redistribute also whole MFC (for this single application, does not
    make much sense).
    
    - MSI installer's custom action dll wixca.dll.Here, we need static link
    so that MSI won't fail on a target system that does not have VC++2015
    runtime already installed.
    f4cdf90d
Windows.cmake 11.3 KB