[Overview][Constants][Types][Procedures and functions][Index] | Reference for unit 'LCLPlatformDef' (#lcl)

# DirNameToLCLPlatform

Gets the platform enumeration value for the specified directory name.

## Declaration

Source position: lclplatformdef.pas line 41

`function DirNameToLCLPlatform(`
`const ADirName: string`
`):TLCLPlatform;`

## Arguments

`ADirName` |  | Directory name to convert to a TLCLPlatform enumeration value.

## Function result

TLCLPlatform enumeration value for the given directory name.

## Description

DirNameToLCLPlatform is a TLCLPlatform function used to get the platform identifier for the source directory specified in the ADirName argument. It is assumed that ADirName contains only the directory name relative to ($LazarusDir)/lcl/interfaces without path delimiters. In other words, a value like: 'win32', 'qt5', or 'gtk3'.

DirNameToLCLPlatform performs a case-insensitive comparison between ADirName and each of the values in the LCLPlatformDirNames constant. The return value is the enumeration value which identifies the platform and widgetset for the specified directory.

If a matching value in LCLPlatformDirNames is not found, the return value is set to lpGtk2.

DirNameToLCLPlatform is called from the lazbuild utility when a widgetset override has been provided on the command line.

## See also

LCLPlatformDirNames |  | Array constant with the directory names for supported LCL platforms.
TLCLPlatform |  | Represents the supported platforms for the LCL.