Properly specify the STATIC_CRT libgit2 flag

libgit2 CMake configuration uses a custom flag `STATIC_CRT` and not the
new CMake policy CMP0091.

When forcing the CMake policy (as we do in our cmake tool), we need to
also set the custom `STATIC_CRT` to avoid compiler warning about the /MD
and /MT flag being overridden.
This commit is contained in:
Fabio Alessandrelli
2025-05-27 11:53:22 +02:00
parent 392b3d6697
commit c7c7822191

View File

@@ -26,7 +26,7 @@ def build_library(env, deps):
"LIBSSH2_INCLUDE_DIR": env.Dir("#thirdparty/ssh2/libssh2/include").abspath,
"LIBSSH2_LIBRARY": deps[-1],
"USE_WINHTTP": 0,
"STATIC_CRT": 0,
"STATIC_CRT": env.get("use_static_cpp", True),
}
if env["platform"] != "windows":