[转]CMake FAQ - Scan. - 博客园
add_library(FooStatic STATIC Foo.c) add_library...(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /...(CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 ...
refer to here and see if it helps
/MTd _DEBUG, _MT msvcrt.lib Static library for the native CRT startup for use with DLL UCRT and vcruntime. /MD _MT, _DLL msvcrtd.lib Static ...