> For the complete documentation index, see [llms.txt](https://docs.lmms.io/developer-guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lmms.io/developer-guides/build-system/useful-variables-macros.md).

# Useful variables/macros

### CMake variables

TODO

### C/C++ macros

The CMake build script generates `lmmsconfig.h` based on those CMake variables. You can find the list of possible macro definitions in `src/lmmsconfig.h.in`.

#### Checking target OS

There are list of macros which will be defined for correspoding target OS. Don't try to check the value, check if they are defined instead.

* `LMMS_BUILD_WIN32`: Windows, either 32bit or 64bit
* `LMMS_BUILD_WIN64`: Windows 64bit
* `LMMS_BUILD_APPLE`: macOS
* `LMMS_BUILD_LINUX`: Linux
* `LMMS_BUILD_OPENBSD`: OpenBSD
* `LMMS_BUILD_FREEBSD`: FreeBSD
* `LMMS_BUILD_HAIKU`: Haiku
