<div dir="ltr"><div><div>I think the idea to include different project files for defining which platform to compile on is a correct workaround;<br></div>however, this forces you to include files with different names depending on which system you want to compile on,<br></div><div>which means you need to have specific .pro files; which is ok, of course, but kind of just pushes the problem a bit further away, and does not make it disappear.<br><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 5, 2014 at 4:03 PM, Mohammed Hassan <span dir="ltr"><<a href="mailto:mohammed.hassan@jollamobile.com" target="_blank">mohammed.hassan@jollamobile.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Dec 04, 2014 at 10:12:37PM +0200, Tone Kastlunger wrote:<br>
> Anything that makes a developer's life easier is absolutely welcomed<br>
> I'd say.<br>
> I must admit to have cursed many times over such a feature not being<br>
> present (either as macro OR as selectior that win32:unix:mac: are..)<br>
> best,<br>
> tortoisedoc<br>
<br>
</span>I have an application which I build for Harmattan, SailfishOS and Android.<br>
<br>
I have a common C++ codebase (95% common maybe), A QML abstraction and<br>
platform specific QML ui bits.<br>
I also have a separate .pro file per platform.<br>
Each .pro file adds an OS specific macro.<br>
<a href="http://harmattan.pro" target="_blank">harmattan.pro</a> adds -DHARMATTAN=1<br>
<a href="http://sailfish.pro" target="_blank">sailfish.pro</a> adds -DSAILFISH=1<br>
<a href="http://android.pro" target="_blank">android.pro</a> adds -DANDROID=1<br>
<br>
Here is an example:<br>
<a href="https://gitorious.org/quran/quran/source/sailfish/sailfish.pro" target="_blank">https://gitorious.org/quran/quran/source/sailfish/sailfish.pro</a><br>
<a href="https://gitorious.org/quran/quran/source/n9/n9.pro" target="_blank">https://gitorious.org/quran/quran/source/n9/n9.pro</a><br>
<br>
Works fine for me.<br>
<br>
Cheers,<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
</div></div></blockquote></div><br></div>