Skip to content

Commit 2eefe1b

Browse files
authored
Ensure C-Runtime is statically linked on Windows (#1)
1 parent bc17d04 commit 2eefe1b

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Build.sln

+10-8
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,26 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build", "build\Build.csproj", "{8363325E-56EB-4B87-B170-C28237FB80CC}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "build\Build.csproj", "{8363325E-56EB-4B87-B170-C28237FB80CC}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoGame.Library.BuildScripts", "buildscripts\MonoGame.Library.BuildScripts.csproj", "{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}"
79
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|Any CPU = Debug|Any CPU
1113
Release|Any CPU = Release|Any CPU
1214
EndGlobalSection
13-
GlobalSection(SolutionProperties) = preSolution
14-
HideSolutionNode = FALSE
15-
EndGlobalSection
1615
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17-
{F9BD9E87-2B0B-4CB8-9C39-3FACD66E14AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18-
{F9BD9E87-2B0B-4CB8-9C39-3FACD66E14AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
19-
{F9BD9E87-2B0B-4CB8-9C39-3FACD66E14AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
20-
{F9BD9E87-2B0B-4CB8-9C39-3FACD66E14AF}.Release|Any CPU.Build.0 = Release|Any CPU
2116
{8363325E-56EB-4B87-B170-C28237FB80CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2217
{8363325E-56EB-4B87-B170-C28237FB80CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
2318
{8363325E-56EB-4B87-B170-C28237FB80CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
2419
{8363325E-56EB-4B87-B170-C28237FB80CC}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
2527
EndGlobalSection
2628
EndGlobal

build/BuildWindowsTask.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public override void Run(BuildContext context)
1313
// Build
1414
var buildDir = "sdl/build";
1515
context.CreateDirectory(buildDir);
16-
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "-A x64 ../" });
16+
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "-A x64 -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ../" });
1717
context.StartProcess("msbuild", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "SDL2.sln /p:Configuration=Release" });
1818

1919
// Copy artifact

0 commit comments

Comments
 (0)