Is there a solution to link libraries according to other plugins status?

I want to link different libraries. They are all for android platform,but for different devices.
Definitely,in order to develop for the specific device,I have to check another plugin.
Is there a solution to do it?

Or how can I get a boolean parameter from build.cs

the only thing I can think of is that you can get defines out of build.cs files

just as an example:
in the build.cs use

if (Target.Type == TargetRules.TargetType.Server)
{
    PublicDefinitions.Add("IS_SERVER=1");
}
else
{
    PublicDefinitions.Add("IS_SERVER=0");
}

in the c++

#if IS_SERVER
   Do server stuff
#endif

UE4 already provides definitions for that, UE_SERVER and platform specific like PLATFORM_ANDROID

modules also have more types then just Editor and Runtime, there ServerOnly and ClientOnly too

also there WhitelistPlatfrom option allowing to make modules build only on specific platform here example from oculus:

"Modules": [
	{
		"Name": "OculusHMD",
		"Type": "Runtime",
		"LoadingPhase": "PostConfigInit",
		"WhitelistPlatforms": [
			"Win64",
			"Win32",
			"Android"
		]
	}

But how would you use that for adding removing different plugins for different android devices?