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
/
libgltf_ue4.16.Build.cs
78 lines (66 loc) · 2.92 KB
/
libgltf_ue4.16.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
// Copyright (o) 2016-2020 Code 4 Game <develop@c4g.io>
using UnrealBuildTool;
using System.Collections.Generic;
public class libgltf_ue4 : ModuleRules
{
public libgltf_ue4(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string glTFPath = System.IO.Path.Combine(ModuleDirectory, "libgltf-0.1.6");
string IncludePath = System.IO.Path.Combine(glTFPath, "include");
List<string> LibPaths = new List<string>();
string LibFilePath = "";
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";
string TargetPostfix = "";
if (Target.Configuration == UnrealTargetConfiguration.Debug)
{
TargetConfiguration = "Debug";
TargetPostfix = "d";
}
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", PlatformName, "vs2019", TargetConfiguration));
LibFilePath = "libgltf" + TargetPostfix + ".lib";
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "linux"));
LibFilePath = "libgltf.a";
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "macos"));
LibFilePath = "libgltf.a";
}
else if (Target.Platform == UnrealTargetPlatform.Android)
{
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "armeabi-v7a"));
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "armeabi-v7a-with-neon"));
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "arm64-v8a"));
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "x86"));
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "android", "x86_64"));
LibFilePath = "libgltf.a";
}
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "ios", "os"));
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "ios", "simulator"));
LibPaths.Add(System.IO.Path.Combine(glTFPath, "lib", "ios", "watchos"));
LibFilePath = "libgltf.a";
}
PublicIncludePaths.Add(IncludePath);
PublicLibraryPaths.AddRange(LibPaths);
PublicAdditionalLibraries.Add(LibFilePath);
PublicDefinitions.Add("LIBGLTF_CHARACTOR_ENCODING_IS_UTF8");
}
}