[Qt-interest] qmake adding mac specific options

Samuel Gaist samuel.gaist at edeltech.ch
Mon Oct 25 09:40:23 CEST 2010


On 25 oct. 10, at 09:22, Paulo Silva wrote:

> Hi, thanks I found something like what I was looking for:
> macx {
> ...
> }
>
> Now I need to add a framework. More specifically SDL_image.
> The problem is that even though I write:
> macx {
>     QMAKE_LFLAGS += -F/Library/Frameworks/
>     LIBS += -framework SDL_image
> }
>
> the path to the include does not get added to the command line.
> Even after rerunning qmake and cleaning/recompiling the project, the  
> include path of that thing is not included in the command line.
> Am I doing something wrong?
>
> Thanks
>
>
> On Mon, Oct 25, 2010 at 3:01 PM, Hannu Shemeikka <hps at shemeikka.org>  
> wrote:
> Hi,
>
> Try q_ws_mac or macx
>
> http://doc.qt.nokia.com/4.7/mac-differences.html
> http://doc.trolltech.com/4.7/qmake-advanced-usage.html
>
> - H
>
> On Mon, 2010-10-25 at 14:24 +0900, Paulo Silva wrote:
> > Hi,
> >
> >
> > how can I add some include/libs that are mac specific.
> > For unix/win32 one can use
> > unix {
> >     ...
> > }
> > win32 {
> > }
> >
> >
> > how about apple specific?
> > I was imagining apple or mach could work.
> > Anyone has any idea?
> >
> >
> > thank you.
> > Paulo
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest

Hi,
Simply move the -F statement to LIBS like this

macx {
LIBS += -F/Library/Frameworks/ -framework SDL_image
}
And by the way, are you sure that SDL_image.framework is in /Library/ 
Frameworks ?
IIRC this path doesn't need to be added as it is searched by default.

Hope this helps
Samuel



More information about the Qt-interest-old mailing list