Re: [SailfishDevel] Check for OS in .PRO file

2014-01-05 Thread Oleksii Serdiuk
I use similar approach, but I do qmake CONFIG+=sailfish and then I can check for it in the .pro file like this: sailfish { DEFINES += Q_OS_SAILFISH ... } Looks shorter and cleaner to me :-) On 03.01.2014 12:21, Timur Kristóf wrote: Hi, What Thomas said makes sense, I just want to ad

Re: [SailfishDevel] Check for OS in .PRO file

2014-01-04 Thread Putze Sven
Thanks, Thomas' hint of avoiding the conditionals convinced me somehow :-) BR. Sven On 04.01.2014, at 12:15, David Greaves wrote: > 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 wo

Re: [SailfishDevel] Check for OS in .PRO file

2014-01-04 Thread David Greaves
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{ >

Re: [SailfishDevel] Check for OS in .PRO file

2014-01-04 Thread Putze Sven
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

Re: [SailfishDevel] Check for OS in .PRO file

2014-01-03 Thread Timur Kristóf
Hi, What Thomas said makes sense, I just want to add one more little thing. You can, in the .spec file, add stuff to qmake, like this define. This would make the necessary code shorter and as a bonus, it gives you something you can even ifdef in C++. # spec file qmake DEFINES+=IS_SAILFISH_OS # p

Re: [SailfishDevel] Check for OS in .PRO file

2014-01-02 Thread Thomas Perl
Hi, On 02 Jan 2014, at 20:25, Sven Putze wrote: > 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 directi