Commit b421edb
committed
Fix static CRT linking with CMake policy and fallback flags
Changes:
- Increase minimum CMake version to 3.15 (required for CMAKE_MSVC_RUNTIME_LIBRARY)
- Enable CMP0091 policy for proper MSVC runtime selection
- Add fallback: Replace /MD with /MT in compiler flags directly
- This ensures static runtime linking works on all CMake versions
The fallback method manually replaces /MD (dynamic) with /MT (static)
in all compiler flags, ensuring compatibility.1 parent 993a134 commit b421edb
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
12 | 28 | | |
13 | 29 | | |
14 | 30 | | |
| |||
0 commit comments