This repository was archived by the owner on Nov 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathlibprotobuf.Build.cs
More file actions
48 lines (37 loc) · 1.49 KB
/
libprotobuf.Build.cs
File metadata and controls
48 lines (37 loc) · 1.49 KB
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
// Copyright 2016 Code 4 Game. All Rights Reserved.
using UnrealBuildTool;
public class libprotobuf : ModuleRules
{
public libprotobuf(TargetInfo Target)
{
Type = ModuleType.External;
bool is_supported = false;
if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
{
is_supported = true;
string vs_path = "vs"
+ WindowsPlatform.GetVisualStudioCompilerVersionName()
+ ((Target.Platform == UnrealTargetPlatform.Win64) ? "win64" : "");
string protobuf_lib_directory_full_path = System.IO.Path.Combine(ModuleDirectoryFullPath, "lib", vs_path);
PublicLibraryPaths.Add(protobuf_lib_directory_full_path);
PublicAdditionalLibraries.Add("libprotobuf.lib");
Definitions.AddRange(
new string[]
{
((Target.Platform == UnrealTargetPlatform.Win64) ? "WIN64" : "WIN32"),
"_WINDOWS",
"NDEBUG",
"GOOGLE_PROTOBUF_CMAKE_BUILD",
});
}
if (is_supported)
{
string protobuf_code_directory_full_path = System.IO.Path.Combine(ModuleDirectoryFullPath, "protobuf", "src");
PublicSystemIncludePaths.Add(protobuf_code_directory_full_path);
}
}
string ModuleDirectoryFullPath
{
get { return System.IO.Path.GetFullPath(ModuleDirectory); }
}
}