[SailfishDevel] Check for OS in .PRO file
David Greaves
david.greaves at jolla.com
Sat Jan 4 11:15:26 UTC 2014
Just for the record this will fail to build on the Community OBS or even in a
Mer Platform SDK using a SailfishOS target.
Thomas and Timur's suggestions would work.
David
On 04/01/14 10:42, Putze Sven wrote:
> Hi,
>
> I should read my mails more often 8) Just figured out
>
> win32|macx{
> SDKHOSTNAME=unknown
> }
> linux-g++{
> SDKHOSTNAME=$$system(hostname)
> }
> contains(SDKHOSTNAME , "SailfishSDK"){
> message("Heureka! Running on the MerSDK VM")
> }
> else{
> message("running somewhere else")
> }
>
>
> But I will also think about what you guys wrote, thank you!
>
> BR.
> Sven
>
> On 02.01.2014, at 20:25, Sven Putze <sailfish.os at hardcodes.de> wrote:
>
>> Hi there,
>>
>> first of all a happy new year to everyone! I had some time offline this morning, so here comes a bunch of emails...
>>
>>
>> There are ways to check for the OS in QtCreator .PRO files, e.g. like
>>
>> unix:symbian{ # do stuff}
>> unix:maemo5{ # do stuff}
>> macx{ # do stuff}
>> win32{ # do stuff}
>>
>> Is there a way to check (or control to be more precise) that some directives are only used when compiling on the MerSDL VM?
>> Just checking for the presence of "sailfishapp" does not work, because that is defined for any OS.
>>
>> BR.
>> Sven
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>
> _______________________________________________
> SailfishOS.org Devel mailing list
>
More information about the Devel
mailing list