From a7b200dc57183ea99bbb6837ab8907fb2d22b849 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Fri, 27 Dec 2024 16:18:15 +0200 Subject: [PATCH] Fix SDL build process on Linux --- Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs index 3f5c8ba81..d2e393a8e 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs @@ -110,8 +110,9 @@ namespace Flax.Deps.Dependencies var solutionPath = Path.Combine(buildDir, "SDL3.sln"); - RunCmake(root, platform, architecture, $"-B\"{buildDir}\" -DSDL_SHARED={(!buildStatic ? "ON" : "OFF")} -DSDL_STATIC={(buildStatic ? "ON" : "OFF")} -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL " + string.Join(" ", configs)); + RunCmake(root, platform, architecture, $"-B\"{buildDir}\" -DCMAKE_INSTALL_PREFIX=\"{buildDir}\" -DSDL_SHARED={(!buildStatic ? "ON" : "OFF")} -DSDL_STATIC={(buildStatic ? "ON" : "OFF")} -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL " + string.Join(" ", configs)); Deploy.VCEnvironment.BuildSolution(solutionPath, configuration, architecture.ToString()); + Utilities.Run("cmake", $"--build . --target install --config {configuration}", null, buildDir, Utilities.RunOptions.DefaultTool); // Copy binaries var depsFolder = GetThirdPartyFolder(options, platform, architecture); @@ -136,6 +137,7 @@ namespace Flax.Deps.Dependencies int concurrency = Math.Min(Math.Max(1, (int)(Environment.ProcessorCount * Configuration.ConcurrencyProcessorScale)), Configuration.MaxConcurrency); RunCmake(root, platform, architecture, $"-B\"{buildDir}\" -DCMAKE_BUILD_TYPE={configuration} -DCMAKE_INSTALL_PREFIX=\"{buildDir}\" -DSDL_SHARED={(!buildStatic ? "ON" : "OFF")} -DSDL_STATIC={(buildStatic ? "ON" : "OFF")} -DCMAKE_POSITION_INDEPENDENT_CODE=ON " + string.Join(" ", configs)); BuildCmake(buildDir, configuration, new Dictionary() { {"CMAKE_BUILD_PARALLEL_LEVEL", concurrency.ToString()} }); + Utilities.Run("cmake", $"--build . --target install --config {configuration}", null, buildDir, Utilities.RunOptions.DefaultTool); // Copy binaries var depsFolder = GetThirdPartyFolder(options, platform, architecture);