Skip to content

Commit

Permalink
fix Library Include
Browse files Browse the repository at this point in the history
  • Loading branch information
crocuis committed May 3, 2019
1 parent 19c034f commit a5c0b4e
Showing 1 changed file with 68 additions and 69 deletions.
137 changes: 68 additions & 69 deletions Source/V8/V8.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,102 +143,101 @@ private bool LoadV8(ReadOnlyTargetRules Target)
}
else if (Target.Platform == UnrealTargetPlatform.Android)
{
string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Android");
PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "ARMv7"));
PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "ARM64"));
PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "x86"));
PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "x64"));

PublicAdditionalLibraries.Add("v8_base");
PublicAdditionalLibraries.Add("v8_libbase");
PublicAdditionalLibraries.Add("v8_libplatform");
PublicAdditionalLibraries.Add("v8_nosnapshot");

if (v8_version[0] >= 6)
string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Android", "ARM64");

PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_init.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_initializers.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_base.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libbase.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libplatform.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_nosnapshot.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libsampler.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_base.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_generated_initializers.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libinspector.a"));

PublicDefinitions.Add(string.Format("WITH_V8=1"));

return true;
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Linux");
if (Target.Configuration == UnrealTargetConfiguration.Debug)
{
if (v8_version[1] >= 4)
{
PublicAdditionalLibraries.Add("v8_init");
PublicAdditionalLibraries.Add("v8_initializers");
}
else
{
PublicAdditionalLibraries.Add("v8_builtins_setup");
PublicAdditionalLibraries.Add("v8_builtins_generators");
}
LibrariesPath = Path.Combine(LibrariesPath, "Debug");
}

if (ShouldLink_libsampler)
else
{
PublicAdditionalLibraries.Add("v8_libsampler");
LibrariesPath = Path.Combine(LibrariesPath, "Release");
}

PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_init.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_initializers.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_base.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libbase.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libplatform.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_nosnapshot.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libsampler.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_base.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_generated_initializers.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libinspector.a"));

PublicDefinitions.Add(string.Format("WITH_V8=1"));

return true;
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Linux");
PublicLibraryPaths.Add(Path.Combine(LibrariesPath, "x64"));

PublicAdditionalLibraries.Add("v8_base");
PublicAdditionalLibraries.Add("v8_libbase");
PublicAdditionalLibraries.Add("v8_libplatform");
PublicAdditionalLibraries.Add("v8_nosnapshot");
string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Mac");

if (v8_version[0] >= 6)
if (Target.Configuration == UnrealTargetConfiguration.Debug)
{
if (v8_version[1] >= 4)
{
PublicAdditionalLibraries.Add("v8_init");
PublicAdditionalLibraries.Add("v8_initializers");
}
else
{
PublicAdditionalLibraries.Add("v8_builtins_setup");
PublicAdditionalLibraries.Add("v8_builtins_generators");
}
LibrariesPath = Path.Combine(LibrariesPath, "Debug");
}

if (ShouldLink_libsampler)
else
{
PublicAdditionalLibraries.Add("v8_libsampler");
LibrariesPath = Path.Combine(LibrariesPath, "Release");
}

PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_init.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_initializers.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_base.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libbase.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libplatform.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_nosnapshot.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libsampler.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_base.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_generated_initializers.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libinspector.a"));

PublicDefinitions.Add(string.Format("WITH_V8=1"));

return true;
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "Mac", "x64");
PublicLibraryPaths.Add(LibrariesPath);

PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath,"libv8_base.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath,"libv8_libbase.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath,"libv8_libplatform.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath,"libv8_nosnapshot.a"));
string LibrariesPath = Path.Combine(ThirdPartyPath, "v8", "lib", "IOS");

if (v8_version[0] >= 6)
if (Target.Configuration == UnrealTargetConfiguration.Debug)
{
if (v8_version[1] >= 4)
{
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath,"libv8_init.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath,"libv8_initializers.a"));
}
else
{
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath,"libv8_builtins_setup.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath,"libv8_builtins_generators.a"));
}
LibrariesPath = Path.Combine(LibrariesPath, "Debug");
}

if (ShouldLink_libsampler)
else
{
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libsampler.a"));
LibrariesPath = Path.Combine(LibrariesPath, "Release");
}

PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_init.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_initializers.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_base.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libbase.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libplatform.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_nosnapshot.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libv8_libsampler.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtorque_generated_initializers.a"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libinspector.a"));

PublicDefinitions.Add(string.Format("WITH_V8=1"));

return true;
Expand Down

0 comments on commit a5c0b4e

Please sign in to comment.