There's also explicit platform support built-in if you need more than that, for example if you don't just want to change a compiler flag, but maybe also want to compile some platform-dependent files.
Create separate targets for different platforms where needed, and then go to the project's properties, which lets you choose a platform ("All" by default) for every build target.