<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 23, 2015 at 1:26 PM, Dirk Hohndel <span dir="ltr"><<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</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 Mon, Nov 23, 2015 at 01:07:59PM -0200, Tomaz Canabrava wrote:<br>
> So, a bit of history<br>
><br>
> Dirk asked me to make subsurface compile in iOS and adding another target<br>
> to our cmake would be quite a task in the state that it currently was:<br>
><br>
> we could:<br>
>  - use the desktop version on mobile<br>
> - use the mobile on desktop<br>
> - use cmake to find some libraries<br>
> - use pkg-config to find the same libraries<br>
> - a *lot* of boilerplate code on cmake<br>
> - build subsurface in source, outsorce<br>
><br>
> I oversimplified some things and not everybody will be happy, so this is a<br>
> call for a little chat, nothing that I did is fixed in stone and I can<br>
> revert lots<br>
><br>
> now, in my desktop I  have around 25 patches that rework the cmake in the<br>
> following way:<br>
><br>
> - desktop version only on desktop<br>
<br>
</span>Anton will be unhappy, but I'll let him comment on that<br></blockquote><div><br></div><div>as I said, tons of what I did I can rework to make people happy. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> - mobile version only on android (iOS to come)<br>
<br>
</span>That's not going to work. The turn-around time for development of the<br>
mobile app if you have to deploy on a mobile OS (even if it's an<br>
emulation) is at least an order of magnitude longer than just doing a<br>
build on Linux (or MacOS) and running Subsurface-mobile there. While for<br>
many things you have to build and test for/on iOS and Android, for a lot<br>
of other code that is not necessary at all. In fact, I tend to do all the<br>
work I do on Subsurface-mobile on Linux and only once it works there to my<br>
satisfaction do I try an Android build and test on a device.<br>
<br>
So no, Subsurface-mobile needs to be able to be compiled at least on<br>
Linux, and likely on MacOS as well.<br></blockquote><div><br></div><div>okay, will redo that part.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> - need to pass -DSUBSURFACE_TARGET_PLATFORM on compile time, if not passed<br>
> it defaults to "Desktop"<br>
<br>
</span>So we already have SUBSURFACE_MOBILE which is set to indicate that you are<br>
building Subsurface-mobile, if it isn't set, you're building the dekstop<br>
version. Can you explain what this new define does that we don't have<br>
already?<br></blockquote><div><br></div><div>it fails if you try to compile for something that doesn't exists with a message explaining what is missing / how to use<br></div><div>the code is more clear ( we had checks for 'if ( linux and not android ) ' followed by if (linux)' followed by if (android and not linux)<br><br></div><div>what I tried to do is to make very well separated targets so the cmake code was easier to follow.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
And the naming is terrible - TARGET_PLATFORM should be the name of an OS,<br>
of a platform, not a concept like "Deksop" vs. "Mobile".<br></blockquote><div><br></div><div>usually the 'Destkop' is the desktop on what the build is hapening, cmake figures out the platform targed later ( so linux vs mac vs windows works out of the box if you pass the type as desktop ) it only means that it's not the mobile version.<br><br></div><div>I'll add another target 'MobileOnDestkop' or something like that that will not have the if (android) tests on it.<br><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> - out-of-source-build only<br>
<br>
That I'm OK with. build.sh has done this for a long time and I believe at<br>
this point most people at least start by using build.sh<br></blockquote><div><br></div><div>yup =)<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
<br>
/D<br>
</font></span></blockquote></div><br></div></div>