I have a plugin that links against a third party library. The build script looks something like:
public MyPlugin(TargetInfo target)
{
PublicAdditionalLibraries.AddRange('ThirdParty/MyLibrary.lib');
}
It works fine but now I have a new requirement. I want to be able to pass a parameter to the build script to tell
it to use another library.
public MyPlugin(TargetInfo target)
{
if(UseMyLibraryB == true)
PublicAdditionalLibraries.AddRange('ThirdParty/MyLibraryB.lib');
else
PublicAdditionalLibraries.AddRange('ThirdParty/MyLibrary.lib');
}
I basically want to be able to build two versions of the plugin: MyPluginWithMyLibrary and MyPluginWithMyLibraryB.
My problem is that I don’t know how to pass that parameter to the build script. I was hoping that I could rely on
GenerateProjectFiles.bat (e.g. GenerateProjectFiles.bat -UseMyLibraryB=true) but it doesn’t
seem to be the case.
Does anyone know how I could achieved what I described above? Ideally I’d have two batch files - the first one would
generate a project that links against MyLibrary.lib while the other batch file would generate a project that links against
MyLibraryB.lib