Question: how to set target OS as a condition? Because I compile this app also for Windows.
I am not entirely sure what you meant to ask by asking that question the way you did.
Target OS as a condition ? When you go to your project options you can change the target CPU/OS etc and thus be able to (cross)compile for Windows. If so desired you can create a (individual) build mode for that so that you do not have to select the target settings, but only the buildmode (which has all specifics for that build mode defined but only once).
If it is about making the option -WM10.9 conditional (and optional) then you could opt for:
Menu, Project/Options, Compiler options/Custom Options
In the section Conditionals, just as an example what I could test:
if TargetOS='win32'
then CustomOptions += '-va';
I am on Linux. Now whenever I select the target in project options to be win32 (which means cross-compiling in my case) the option -va is added to the compiler options. And for sure i get a whole bunch of output (only) when cross-compiling to win32.
For your -WM options it should probably read something like:
if TargetOS='darwin'
then CustomOptions += '-WM10.9';
What (I hope for you) that does is only adding the option -WM if your target is darwin as only there adding the option -WM makes sense. More information on that feature can be read
here.
But I have no idea if either of the two answers I mentioned is actually answering your question.