From c7c78221911d2769ee974967f79b2551a891f193 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 27 May 2025 11:53:22 +0200 Subject: [PATCH] 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. --- tools/git2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/git2.py b/tools/git2.py index 8b4172b..80d80b9 100644 --- a/tools/git2.py +++ b/tools/git2.py @@ -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":