[CMake] RE: Qt 4.0 support in CMake and VTK

Moreland, Kenneth kmorel at sandia.gov
Wed Aug 31 17:47:51 EDT 2005


Ah, ha.  That's where things went wrong.  I didn't think to check the CMakeLists.txt for having an IF(APPLE) for Qt library stuff since that seems like a very, very wrong thing to do.  Any determination of Qt libraries should be determined by FindQt4.cmake so it is right for everyone.

As it stands now, it looks like FindQt4.cmake is correct if Qt is compiled with -no-framework.  The additions to VTK/GUISupport/Qt/CMakeLists.txt makes it wrong (or at least difficult) everywhere.

-Ken


-----Original Message-----
From: Clinton Stimpson [mailto:clinton at elemtech.com]
Sent: Wed 8/31/2005 2:39 PM
To: Moreland, Kenneth
Cc: Christopher Knox; Ken Martin; Wylie, Brian; cmake at cmake.org
Subject: RE: [CMake] RE: Qt 4.0 support in CMake and VTK
 

Does CMake do anything to help with linking with frameworks vs.
non-frameworks?  I'm not aware of CMake giving this support.
I think it would be nice to not have IF(APPLE) in the CMakeLists.txt files for
linking to Qt4.

If you are building VTK/GUISupport/Qt, the CMakeLists.txt files are hard coded
to use Qt as a framework (which is the default Qt configuration), with some
IF(APPLE)'s.  That can changed with more conditionals, CMake providing better
support, and/or using support that CMake already gives.

Clint

Quoting "Moreland, Kenneth" <kmorel at sandia.gov>:

> I did eventually figure that out.  I went back, downloaded the source 
> and compiled with the -no-framework option.  Everything worked fine 
> except that CMake automatically changed the library flags from the 
> expected -lQtGui (and the like) to -framework QtGui.  So right now, 
> CMake is not working well with Qt compiled with or without frameworks 
> (as of the CMake checked out on August 24).
>
> -Ken
>
>
> -----Original Message-----
> From: Christopher Knox [mailto:knoxc at uci.edu]
> Sent: Thu 8/25/2005 1:51 PM
> To: Moreland, Kenneth
> Cc: Clinton Stimpson; Ken Martin; Wylie, Brian; cmake at cmake.org
> Subject: Re: [CMake] RE: Qt 4.0 support in CMake and VTK
>
> Hi,
>
> This might be a totally unnecessary as you probably are aware of this
> - but just in case you are not I thought I would submit it.
>
> When you do a default configure of Qt4 on a Mac it does a 'framework'
> build and and the Qt modules land up in
> /usr/local/Trolltech/Qt-4.0.1/lib/QtXXXX.framework - the header files
> are actually in
> QTXXXX.framework/Versions/Current/Headers and the actual library is
> QTXXXX.framework/Versions/Current/QTXXXX (with no extension)
>
> There are symlinks to both the headers and the library in
> QTXXX.framework
>
> If you pass -no-framework to configure then you get something that
> looks the same as the linux install and the headers are then in /usr/
> local/Trolltech/Qt-4.0.1/include/QtXXXX
>
> But although Trolltech provides a 'framework' build it seems that
> qmake -query is not aware of it.
>
> Unfortunately Qt4 users on OSX could have either of these
> configurations - something that will make cmake's job more complicated.
>
> I hope that was helpful and not something you already knew :)
>
> Chris
>
> On Aug 25, 2005, at 8:26 AM, Moreland, Kenneth wrote:
>
>> OK.  I think I see what is going on.  The problem is that
>> QT_QGLOBAL_H_FILE is not being set properly.  Thus, Qt is not really
>> found, but CMake is not reporting an error.
>>
>> CMake seems to be finding the correct qmake, but qmake -query
>> QT_INSTALL_HEADERS returns /usr/local/Trollteh/Qt-4.0.1/include, which
>> does not exist.  Apparently this is a Qt install problem, not really a
>> CMake problem.
>>
>> -Ken
>>
>>
>>> -----Original Message-----
>>> From: Clinton Stimpson [mailto:clinton at elemtech.com]
>>> Sent: Thursday, August 25, 2005 9:12 AM
>>> To: Moreland, Kenneth
>>> Cc: Ken Martin; Wylie, Brian; cmake at cmake.org
>>> Subject: Re: Qt 4.0 support in CMake and VTK
>>>
>>> Moreland, Kenneth wrote:
>>>
>>>
>>>>> Did you have Qt4's qmake in the PATH ?
>>>>> QT_MOC_EXECUTABLE needs to be set to your Qt4's moc.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> Yes.  The problem is that FindQt.cmake does not set
>>>>
>>> QT_MOC_EXECUTABLE
>>>
>>>> anywhere.  Where is QT_MOC_EXECUTABLE being set?
>>>>
>>>> -Ken
>>>>
>>>>
>>> It gets set in FindQt4.cmake.
>>> Clint
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> CMake mailing list
>> CMake at cmake.org
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
>
>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20050831/402c36ef/attachment.htm


More information about the CMake mailing list