[CMake] QT4 on OSX and Cocoa

Michael Jackson mike.jackson at bluequartz.net
Tue May 4 12:04:48 EDT 2010


According to this page:

http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x

You download EITHER the Carbon OR the Cocoa version. I think you are  
getting confused with actually BUILDING Qt yourself. If you do build  
Qt yourself then you will need to pass the "-cocoa" to the configure  
script in order to build Qt with Cocoa. You would also need to pass  
the proper arch flags in addition so that you build the archs that you  
want to support (i386, ppc, x86_64).

  Once Qt is built and (optionally) installed, CMake will determine  
which option (Carbon or Cocoa) was used when Qt was built and add the  
appropriate compile and linker flags to your build.

Hope that helps.
___________________________________________________________
Mike Jackson                      www.bluequartz.net
Principal Software Engineer       mike.jackson at bluequartz.net
BlueQuartz Software               Dayton, Ohio


On May 4, 2010, at 11:50 AM, Aaron Turner wrote:

> per this:
>
> http://doc.qt.nokia.com/4.6/developing-on-mac.html
>
> There is only one build, but it supports both.  Unfortunately, it
> defaults to Carbon *unless* you pass -cocoa to qmake.  And Carbon
> doesn't support 64bit.  Since QT4/Cocoa supports 32bit & 64bit it's
> safe to default that way; no idea why Nokia didn't choose that in the
> first place.
>
> Sounds like I need to hack the FindQt4.cmake package and send a  
> patch. :)
>
> On Tue, May 4, 2010 at 6:05 AM, Michael Jackson
> <mike.jackson at bluequartz.net> wrote:
>> Did you download a Cocoa build of Qt4 or build Qt4 with Cocoa support
>> yourself? I don't think there is anything special to do in CMake  
>> besides the
>> normal find_package (Qt4) stuff.
>>
>> ___________________________________________________________
>> Mike Jackson                      www.bluequartz.net
>> Principal Software Engineer       mike.jackson at bluequartz.net
>> BlueQuartz Software               Dayton, Ohio
>>
>>
>> On May 4, 2010, at 12:31 AM, Aaron Turner wrote:
>>
>>> What's the trick for getting cmake to pass -cocoa to qmake so QT4  
>>> will
>>> link against 64bit apps on Snow Leopard?  The default QT4 build only
>>> supports 64bit under Cocoa, but Carbon is the default.
>>>
>>> --
>>> Aaron Turner
>>> http://synfin.net/         Twitter: @synfinatic
>>> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for  
>>> Unix &
>>> Windows
>>> Those who would give up essential Liberty, to purchase a little  
>>> temporary
>>> Safety, deserve neither Liberty nor Safety.
>>>   -- Benjamin Franklin
>>> "carpe diem quam minimum credula postero"
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>
>>
>
>
>
> -- 
> Aaron Turner
> http://synfin.net/         Twitter: @synfinatic
> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for  
> Unix & Windows
> Those who would give up essential Liberty, to purchase a little  
> temporary
> Safety, deserve neither Liberty nor Safety.
>    -- Benjamin Franklin
> "carpe diem quam minimum credula postero"



More information about the CMake mailing list