Merge branch 'master' into 1.2
This commit is contained in:
@@ -248,7 +248,7 @@ namespace Flax.Build
|
||||
// Get all modules aggregated into all binary modules used in all configurations of this target
|
||||
foreach (var configurationData in mainProject.Configurations)
|
||||
{
|
||||
var configurationBinaryModules = GetBinaryModules(rootProject, configurationData.Target, configurationData.Modules);
|
||||
var configurationBinaryModules = GetBinaryModules(projectInfo, configurationData.Target, configurationData.Modules);
|
||||
foreach (var configurationBinaryModule in configurationBinaryModules)
|
||||
{
|
||||
// Skip if none of the included binary modules is inside the project workspace (eg. merged external binary modules from engine to game project)
|
||||
@@ -274,7 +274,7 @@ namespace Flax.Build
|
||||
{
|
||||
var referenceBuildOptions = GetBuildOptions(referenceTarget, configurationData.TargetBuildOptions.Platform, configurationData.TargetBuildOptions.Toolchain, configurationData.Architecture, configurationData.Configuration, reference.Project.ProjectFolderPath);
|
||||
var referenceModules = CollectModules(rules, referenceBuildOptions.Platform, referenceTarget, referenceBuildOptions, referenceBuildOptions.Toolchain, referenceBuildOptions.Architecture, referenceBuildOptions.Configuration);
|
||||
var referenceBinaryModules = GetBinaryModules(rootProject, referenceTarget, referenceModules);
|
||||
var referenceBinaryModules = GetBinaryModules(projectInfo, referenceTarget, referenceModules);
|
||||
foreach (var binaryModule in referenceBinaryModules)
|
||||
{
|
||||
project.Defines.Add(binaryModule.Key.ToUpperInvariant() + "_API=");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
@@ -25,6 +26,11 @@ namespace Flax.Deps.Dependencies
|
||||
{
|
||||
TargetPlatform.Windows,
|
||||
};
|
||||
case TargetPlatform.Linux:
|
||||
return new[]
|
||||
{
|
||||
TargetPlatform.Linux,
|
||||
};
|
||||
default: return new TargetPlatform[0];
|
||||
}
|
||||
}
|
||||
@@ -76,7 +82,37 @@ namespace Flax.Deps.Dependencies
|
||||
foreach (var filename in binariesToCopyWin)
|
||||
Utilities.FileCopy(Path.Combine(root, "build", "Win64", vcVersion, configuration, filename), Path.Combine(depsFolder, Path.GetFileName(filename)));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case TargetPlatform.Linux:
|
||||
{
|
||||
// Build for Linux
|
||||
var settings = new []
|
||||
{
|
||||
"-without-librtmp",
|
||||
"--without-ssl",
|
||||
"--with-gnutls",
|
||||
"--disable-ipv6",
|
||||
"--disable-manual",
|
||||
"--disable-verbose",
|
||||
"--disable-shared",
|
||||
"--enable-static",
|
||||
"-disable-ldap --disable-sspi --disable-ftp --disable-file --disable-dict --disable-telnet --disable-tftp --disable-rtsp --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-smb",
|
||||
};
|
||||
var envVars = new Dictionary<string, string>
|
||||
{
|
||||
{ "CC", "clang-7" },
|
||||
{ "CC_FOR_BUILD", "clang-7" }
|
||||
};
|
||||
var buildDir = Path.Combine(root, "build");
|
||||
SetupDirectory(buildDir, true);
|
||||
Utilities.Run("chmod", "+x configure", null, root, Utilities.RunOptions.None);
|
||||
Utilities.Run(Path.Combine(root, "configure"), string.Join(" ", settings) + " --prefix=\"" + buildDir + "\"", null, root, Utilities.RunOptions.None, envVars);
|
||||
Utilities.Run("make", null, null, root, Utilities.RunOptions.None);
|
||||
Utilities.Run("make", "install", null, root, Utilities.RunOptions.None);
|
||||
var depsFolder = GetThirdPartyFolder(options, TargetPlatform.Linux, TargetArchitecture.x64);
|
||||
var filename = "libcurl.a";
|
||||
Utilities.FileCopy(Path.Combine(buildDir, "lib", filename), Path.Combine(depsFolder, filename));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user