# How to load different dependency modules for different build targets

**URL:** <https://forums.unrealengine.com/t/how-to-load-different-dependency-modules-for-different-build-targets/486091>\
**Category:** Platform & Builds\
**Tags:** dependencies, oculus-quest, buildcs, unreal-engine, question\
**Created:** [July 12, 2021, 11:35am UTC](https://forums.unrealengine.com/t/how-to-load-different-dependency-modules-for-different-build-targets/486091 "2021-07-12T11:35:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Joost](https://forums.unrealengine.com/u/Joost)\
**Post date:** [July 12, 2021, 11:35am UTC](https://forums.unrealengine.com/t/how-to-load-different-dependency-modules-for-different-build-targets/486091/1 "2021-07-12T11:35:34Z")

</div>

I’m targeting different standalone VR headsets and, for example, I need to load the Oculus plugin on the Quest and the WaveVR plugin for Vive standalone headsets. I can selectively load plugins with the different target.cs files. But I also need to load different dependency modules in my build.cs file for different build targets.  
I.e. I need to add “PrivateDependencyModuleNames.Add(“OculusHMD”);” to my build.cs but only when targeting the Quest.

I tried the following:

`GlobalDefinitions.Add("MY_VAR=0");` in target1.cs  
and `GlobalDefinitions.Add("MY_VAR=1");` in target2.cs

I need a way to check that in my build.cs file.

Something like this, which doesn’t work.

```
if (PublicDefinitions.Contains("MY_VAR=1")) {
PrivateDependencyModuleNames.Add("");
}

```

Anyone have any ideas? Or a different way of handling this?
