<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7232.77">
<TITLE>RE: [CMake] RE: Qt 4.0 support in CMake and VTK</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>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.<BR>
<BR>
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.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Clinton Stimpson [<A HREF="mailto:clinton@elemtech.com">mailto:clinton@elemtech.com</A>]<BR>
Sent: Wed 8/31/2005 2:39 PM<BR>
To: Moreland, Kenneth<BR>
Cc: Christopher Knox; Ken Martin; Wylie, Brian; cmake@cmake.org<BR>
Subject: RE: [CMake] RE: Qt 4.0 support in CMake and VTK<BR>
<BR>
<BR>
Does CMake do anything to help with linking with frameworks vs.<BR>
non-frameworks? I'm not aware of CMake giving this support.<BR>
I think it would be nice to not have IF(APPLE) in the CMakeLists.txt files for<BR>
linking to Qt4.<BR>
<BR>
If you are building VTK/GUISupport/Qt, the CMakeLists.txt files are hard coded<BR>
to use Qt as a framework (which is the default Qt configuration), with some<BR>
IF(APPLE)'s. That can changed with more conditionals, CMake providing better<BR>
support, and/or using support that CMake already gives.<BR>
<BR>
Clint<BR>
<BR>
Quoting "Moreland, Kenneth" <kmorel@sandia.gov>:<BR>
<BR>
> I did eventually figure that out. I went back, downloaded the source<BR>
> and compiled with the -no-framework option. Everything worked fine<BR>
> except that CMake automatically changed the library flags from the<BR>
> expected -lQtGui (and the like) to -framework QtGui. So right now,<BR>
> CMake is not working well with Qt compiled with or without frameworks<BR>
> (as of the CMake checked out on August 24).<BR>
><BR>
> -Ken<BR>
><BR>
><BR>
> -----Original Message-----<BR>
> From: Christopher Knox [<A HREF="mailto:knoxc@uci.edu">mailto:knoxc@uci.edu</A>]<BR>
> Sent: Thu 8/25/2005 1:51 PM<BR>
> To: Moreland, Kenneth<BR>
> Cc: Clinton Stimpson; Ken Martin; Wylie, Brian; cmake@cmake.org<BR>
> Subject: Re: [CMake] RE: Qt 4.0 support in CMake and VTK<BR>
><BR>
> Hi,<BR>
><BR>
> This might be a totally unnecessary as you probably are aware of this<BR>
> - but just in case you are not I thought I would submit it.<BR>
><BR>
> When you do a default configure of Qt4 on a Mac it does a 'framework'<BR>
> build and and the Qt modules land up in<BR>
> /usr/local/Trolltech/Qt-4.0.1/lib/QtXXXX.framework - the header files<BR>
> are actually in<BR>
> QTXXXX.framework/Versions/Current/Headers and the actual library is<BR>
> QTXXXX.framework/Versions/Current/QTXXXX (with no extension)<BR>
><BR>
> There are symlinks to both the headers and the library in<BR>
> QTXXX.framework<BR>
><BR>
> If you pass -no-framework to configure then you get something that<BR>
> looks the same as the linux install and the headers are then in /usr/<BR>
> local/Trolltech/Qt-4.0.1/include/QtXXXX<BR>
><BR>
> But although Trolltech provides a 'framework' build it seems that<BR>
> qmake -query is not aware of it.<BR>
><BR>
> Unfortunately Qt4 users on OSX could have either of these<BR>
> configurations - something that will make cmake's job more complicated.<BR>
><BR>
> I hope that was helpful and not something you already knew :)<BR>
><BR>
> Chris<BR>
><BR>
> On Aug 25, 2005, at 8:26 AM, Moreland, Kenneth wrote:<BR>
><BR>
>> OK. I think I see what is going on. The problem is that<BR>
>> QT_QGLOBAL_H_FILE is not being set properly. Thus, Qt is not really<BR>
>> found, but CMake is not reporting an error.<BR>
>><BR>
>> CMake seems to be finding the correct qmake, but qmake -query<BR>
>> QT_INSTALL_HEADERS returns /usr/local/Trollteh/Qt-4.0.1/include, which<BR>
>> does not exist. Apparently this is a Qt install problem, not really a<BR>
>> CMake problem.<BR>
>><BR>
>> -Ken<BR>
>><BR>
>><BR>
>>> -----Original Message-----<BR>
>>> From: Clinton Stimpson [<A HREF="mailto:clinton@elemtech.com">mailto:clinton@elemtech.com</A>]<BR>
>>> Sent: Thursday, August 25, 2005 9:12 AM<BR>
>>> To: Moreland, Kenneth<BR>
>>> Cc: Ken Martin; Wylie, Brian; cmake@cmake.org<BR>
>>> Subject: Re: Qt 4.0 support in CMake and VTK<BR>
>>><BR>
>>> Moreland, Kenneth wrote:<BR>
>>><BR>
>>><BR>
>>>>> Did you have Qt4's qmake in the PATH ?<BR>
>>>>> QT_MOC_EXECUTABLE needs to be set to your Qt4's moc.<BR>
>>>>><BR>
>>>>><BR>
>>>>><BR>
>>>>><BR>
>>>><BR>
>>>> Yes. The problem is that FindQt.cmake does not set<BR>
>>>><BR>
>>> QT_MOC_EXECUTABLE<BR>
>>><BR>
>>>> anywhere. Where is QT_MOC_EXECUTABLE being set?<BR>
>>>><BR>
>>>> -Ken<BR>
>>>><BR>
>>>><BR>
>>> It gets set in FindQt4.cmake.<BR>
>>> Clint<BR>
>>><BR>
>>><BR>
>>><BR>
>>><BR>
>><BR>
>> _______________________________________________<BR>
>> CMake mailing list<BR>
>> CMake@cmake.org<BR>
>> <A HREF="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</A><BR>
>><BR>
><BR>
><BR>
><BR>
><BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>