Skip to content

Commit

Permalink
Ensure C-Runtime is statically linked on Windows (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhelmut committed Jan 22, 2024
1 parent bc17d04 commit 2eefe1b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions Build.sln
Expand Up @@ -3,24 +3,26 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build", "build\Build.csproj", "{8363325E-56EB-4B87-B170-C28237FB80CC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "build\Build.csproj", "{8363325E-56EB-4B87-B170-C28237FB80CC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoGame.Library.BuildScripts", "buildscripts\MonoGame.Library.BuildScripts.csproj", "{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F9BD9E87-2B0B-4CB8-9C39-3FACD66E14AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9BD9E87-2B0B-4CB8-9C39-3FACD66E14AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9BD9E87-2B0B-4CB8-9C39-3FACD66E14AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9BD9E87-2B0B-4CB8-9C39-3FACD66E14AF}.Release|Any CPU.Build.0 = Release|Any CPU
{8363325E-56EB-4B87-B170-C28237FB80CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8363325E-56EB-4B87-B170-C28237FB80CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8363325E-56EB-4B87-B170-C28237FB80CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8363325E-56EB-4B87-B170-C28237FB80CC}.Release|Any CPU.Build.0 = Release|Any CPU
{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5FA98AA-D51B-44AD-9CBF-F33F551E5A55}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion build/BuildWindowsTask.cs
Expand Up @@ -13,7 +13,7 @@ public override void Run(BuildContext context)
// Build
var buildDir = "sdl/build";
context.CreateDirectory(buildDir);
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "-A x64 ../" });
context.StartProcess("cmake", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "-A x64 -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ../" });
context.StartProcess("msbuild", new ProcessSettings { WorkingDirectory = buildDir, Arguments = "SDL2.sln /p:Configuration=Release" });

// Copy artifact
Expand Down

0 comments on commit 2eefe1b

Please sign in to comment.