This repository has been archived by the owner on Nov 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlibdraco_ue4.10.Build.cs
80 lines (68 loc) · 3.05 KB
/
libdraco_ue4.10.Build.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Copyright (o) 2016-2020 Code 4 Game <develop@c4g.io>
using UnrealBuildTool;
using System.Collections.Generic;
public class libdraco_ue4 : ModuleRules
{
public libdraco_ue4(TargetInfo Target)
{
Type = ModuleType.External;
string DracoPath = System.IO.Path.Combine(ModuleDirectory, "libdraco-1.3.6");
string IncludePath = System.IO.Path.Combine(DracoPath, "include");
List<string> LibPaths = new List<string>();
List<string> LibFilePaths = new List<string>();
if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
{
string PlatformName = "";
switch (Target.Platform)
{
case UnrealTargetPlatform.Win32:
PlatformName = "win32";
break;
case UnrealTargetPlatform.Win64:
PlatformName = "win64";
break;
}
string TargetConfiguration = "Release";
if (Target.Configuration == UnrealTargetConfiguration.Debug)
{
TargetConfiguration = "Debug";
}
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", PlatformName, "vs2019", TargetConfiguration));
LibFilePaths.Add("dracodec.lib");
LibFilePaths.Add("dracoenc.lib");
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "linux"));
LibFilePaths.Add("libdracodec.a");
LibFilePaths.Add("libdracoenc.a");
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "macos"));
LibFilePaths.Add("libdracodec.a");
LibFilePaths.Add("libdracoenc.a");
}
else if (Target.Platform == UnrealTargetPlatform.Android)
{
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "armeabi-v7a"));
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "armeabi-v7a-with-neon"));
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "arm64-v8a"));
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "x86"));
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "android", "x86_64"));
LibFilePaths.Add("libdracodec.a");
LibFilePaths.Add("libdracoenc.a");
}
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "ios", "os"));
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "ios", "simulator"));
LibPaths.Add(System.IO.Path.Combine(DracoPath, "lib", "ios", "watchos"));
LibFilePaths.Add("libdracodec.a");
LibFilePaths.Add("libdracoenc.a");
}
PublicIncludePaths.Add(IncludePath);
PublicLibraryPaths.AddRange(LibPaths);
PublicAdditionalLibraries.AddRange(LibFilePaths);
}
}