[CMake] Staticly Link to VC++ Runtime

Yuri Timenkov ytimenkov at parallels.com
Fri Jul 18 05:43:03 EDT 2008


On Friday 18 July 2008 13:33:59 Mike Arthur wrote:
> I'm trying to distribute my application to Windows users and am getting
> some fairly horrendous grief with manifests.
>
> Can anyone advise how I'd get CMake to statictly link against the msvc*.dll
> files that my application needs when compiled with MSVC++?
According to MSDN you have 2 options:
1) add _STATIC_CPPLIB define.
2) Change compiler flags /MD -> /MT, /MDd -> /MTd (look into  
CMAKE_CXX_FLAGS_*)

>
> Thanks!



More information about the CMake mailing list