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

</BODY>
</HTML>