I am currently trying to link one SDK, its file structure for Cocos2D is as following, I wonder where I should put these files in UE 4.16.
Also I wonder how I can link a .so file into my UE project.
The SDK provider does not provide instruction for UE
Use UPL to copy the appropriate .so to and the jar file to libs. Take a look at GearVR_APL.xml for an example.
To use the includes and link against the .so you need to set up a Build.cs which adds them to the link. Something like this:
using UnrealBuildTool;
public class GCloud: ModuleRules
{
public GCloud(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
string GCloudPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "GCloud/";
if (Target.Platform == UnrealTargetPlatform.Android)
{
// toolchain will filter properly
PublicIncludePaths.Add(GCloudPath + "include");
PublicLibraryPaths.Add(GCloudPath + "libs/Android/ARMv7");
// PublicLibraryPaths.Add(GCloudPath + "libs/Android/ARM64");
PublicLibraryPaths.Add(GCloudPath + "libs/Android/x86");
PublicAdditionalLibraries.Add("libGCloudVoice.so");
// register UPL
string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, BuildConfiguration.RelativeEnginePath);
AdditionalPropertiesForReceipt.Add(new ReceiptProperty("AndroidPlugin", Path.Combine(PluginPath, "GCloud_UPL.xml")));
}
}
}
Thank you very much:D!
I have been trying to figure it out for weeks~