handle disabled modules in application dependencies

Use a variable for the module target