Detect build type (Debug/Release) in Build.cs file

Hello World.

I need to distinguish between Debug and Release builds of my game.

i tried to link third party library witch has two versions of prebuild .lib’s Debug/Release. So, in case of Debug build i need to link Debug version of library, and, in case of Release build i need to link release version of lib.

I need something line this in my module Build.cs file:
if(Debug) { PublicAdditionalLibraries.Add(“tpDebug.lib”); }else{ PublicAdditionalLibraries.Add(“tpRelease.lib”); }

How to achieve this?

Currently, i do it like this:
switch (Target.Configuration)
case UnrealTargetConfiguration.DebugGame:
case UnrealTargetConfiguration.Debug:
case UnrealTargetConfiguration.Development:
buildType = “Debug”;

                        buildType = "Release";


But i don’t know if this correct approach

Can you give more info? Where is this code defined? How does the function signature look like?