You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Creates the UnrealArchitectures class, which wraps a list of UnrealArch objects - UnrealArch is a single architecture, expandable enum-like struct - There is no more concept of "no/default architecture", there is always a valid active architecture when building - Most uses of "string Architecture" are replaced with one of the two above, depending if multiple architectures are supported or not - UnrealArch has some platform-extensions for platform-specific naming (like Linux adds in LinuxName that turns, for instance, Arm64 -> aarch64-unknown-linux-gnueabi, which is used in folder names, etc) - UnrealArch has bIsX64 which can be used determine intel instruction set (as opposed to arm) - TargetRules class has an "Architecture" accessor that will return a single architecture if the active architectures is a single architecture, or throw an exception if multiple. This is useful in a majority of the cases where a paltform can only have a single architecture active in TargetRules (microsoft platforms, for instance, will create separate targets when compiling multiple architectures at once) - Added UnrealArchitectureConfig class, which contains all the architecture information for a platform (what architectures are supported, what ones are currently active for given project, etc) #preflight 63c81fb5b065224750a1759e #rb mike.fricker,roman.dzieciol,joe.kirchoff,dmytro.vovk,brandon.schaefer [various parts] #p4v-preflight-copy 23562471 [CL 23829977 by josh adams in ue5-main branch]
60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.IO;
|
|
using UnrealBuildTool;
|
|
|
|
public class libav : ModuleRules
|
|
{
|
|
public libav(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
PCHUsage = PCHUsageMode.NoPCHs;
|
|
|
|
PrivateDependencyModuleNames.AddRange(
|
|
new string[] {
|
|
"Core",
|
|
});
|
|
|
|
|
|
PublicSystemIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
|
|
|
|
if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
|
|
{
|
|
string IncPath = Path.Combine(ModuleDirectory, "include");
|
|
string LibPath = Path.Combine(ModuleDirectory, "lib", "Linux", Target.Architecture.LinuxName);
|
|
|
|
// The files we check for existence to determine whether or not we can enable the
|
|
// use ov libav.
|
|
string [] FilesToProbe = new string [] {
|
|
Path.Combine(IncPath, "libavcodec", "avcodec.h"),
|
|
Path.Combine(IncPath, "libavutil", "avutil.h"),
|
|
Path.Combine(LibPath, "libavcodec.so"),
|
|
Path.Combine(LibPath, "libavutil.so")
|
|
};
|
|
bool bHaveRequiredFiles = true;
|
|
foreach(string Probe in FilesToProbe)
|
|
{
|
|
bool bHaveFile = File.Exists(Probe);
|
|
//Console.WriteLine("checking:" + Probe + " -> " + bHaveFile);
|
|
if (!bHaveFile)
|
|
{
|
|
bHaveRequiredFiles = false;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (bHaveRequiredFiles)
|
|
{
|
|
PrivateIncludePaths.Add(Path.Combine(IncPath));
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libavcodec.so"));
|
|
PublicAdditionalLibraries.Add(Path.Combine(LibPath, "libavutil.so"));
|
|
PublicDefinitions.Add("WITH_LIBAV=1");
|
|
}
|
|
else
|
|
{
|
|
PublicDefinitions.Add("WITH_LIBAV=0");
|
|
}
|
|
}
|
|
}
|
|
}
|