Skip to content

Commit c7c7822

Browse files
committed
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.
1 parent 392b3d6 commit c7c7822

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/git2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def build_library(env, deps):
2626
"LIBSSH2_INCLUDE_DIR": env.Dir("#thirdparty/ssh2/libssh2/include").abspath,
2727
"LIBSSH2_LIBRARY": deps[-1],
2828
"USE_WINHTTP": 0,
29-
"STATIC_CRT": 0,
29+
"STATIC_CRT": env.get("use_static_cpp", True),
3030
}
3131

3232
if env["platform"] != "windows":

0 commit comments

Comments
 (0)