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.