[SailfishDevel] Check for OS in .PRO file
    Putze Sven 
    sailfish.os at hardcodes.de
       
    Sat Jan  4 10:42:49 UTC 2014
    
    
  
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
    
    
More information about the Devel
mailing list