[Qt-interest] qmake adding mac specific options

Paulo Silva paulo.jnkml at gmail.com
Mon Oct 25 12:06:55 CEST 2010


Anyway, while I can't find how to use that thing I'm using the whole path:

INCLUDEPATH += /Library/Frameworks/SDL_image.framework/Versions/A/Headers


=p




On Mon, Oct 25, 2010 at 6:59 PM, Paulo Silva <paulo.jnkml at gmail.com> wrote:

> Hi,
> thank you for the help.
> Yes, I'm sure that SDL_image is there 'cuse I copied it myself.
> and locate SDL_image also prints:
> /Library/Frameworks/SDL_image.framework
> (...)
>
> Doing what you said unfortunately it did not help.
> I even changed the .pro to include the framework: (as that makes some sense
> to me)
>
> macx {
>
>     INCLUDEPATH += -F/Library/Frameworks/ -framework SDL_image
>
>     LIBS += -F/Library/Frameworks/ -framework SDL_image
>
> }
>
>
> But no luck. Nothing new gets added to the compilation command.
> Actually after adding that to the INCLUDEPATH here's where what gets
> added:
>
>
> g++ -c -pipe -g -gdwarf-2 -fPIC -I/usr/X11/include/freetype2
> -I/usr/X11/include -I/opt/local/include -I/opt/local/include/FTGL
> -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/opt/local/include/SDL -Wall -W
> -I/usr/local/Qt4.7/mkspecs/macx-g++ -I../qtc -I/usr/include
> -I-F/Library/Frameworks/ -I-framework -ISDL_image -I../include -I. -I../qtc
> -I. -o imgldr.o ../src/imgldr.cpp
>
> Now either it does not make sense to add -framework to INCLUDEPATH,
> therefore "-I-F/Library/Frameworks/ -I-framework" does not get expanded
> but it is used as if it was an actual path, but then where do I add the
> framework.
> http://doc.qt.nokia.com/4.6/qmake-platform-notes.html#mac-os-x this page
> does not help much... =(
>
> I'll keep on searching, but if anyone knows how to do this help is welcome
> =)
>
>
> On Mon, Oct 25, 2010 at 4:40 PM, Samuel Gaist <samuel.gaist at edeltech.ch>wrote:
>
>> 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
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101025/6d2fa5d0/attachment.html 


More information about the Qt-interest-old mailing list