qt4-mac and OpenGL

Marcus Calhoun-Lopez mcalhoun at macports.org
Tue Mar 17 17:16:00 PDT 2009


Alexy Khrabrov <deliverable <at> gmail.com> writes:

> I've got a package for graph layout visualization, called Pigale,  
> which uses qt4 and GL via GLUT.  It turns out the latter wants X11,  
> while I was able to get a qt4-mac port to build nicely.  Pigale builds  
> fine under qt4-x11.  Now I started poking around to see how those  
> things are configured, and my hunch is that I can use PKG_CONFIG_PATH  
> to have only one of
> /opt/local/libexec/qt4-mac/lib/pkgconfig
> /opt/local/libexec/qt4-x11/lib/pkgconfig
-- and everything will be done for the right Qt flavor, right?
Yes, setting only one should allow you to find the correct Qt libraries.

> Pigale uses --with-qt-includes=... switch to its configure, and giving it  
> either the Aqua's or X11's .../include/ worked to build the right  
> widgets.  Apparently one can do things by QT4DIR, too -- so that would  
> be the right libexec subdir then?
Although I am not familiar with Pigale, setting QT4DIR to the
correct libexec directory should work.

> What I am wondering about is the GL compatibility.  Pigale uses  
> libfreeglut to label the graph, and that wanted X11.  However, under / 
> opt/local/Frameworks/, it turns out, qt4-mac deposits a bunch of its  
> frameworks, including a QtOpenGL.  Does anyone know how those  
> correspond to OpenGL, and why are the frameworks there only for qt4- 
> mac and not qt4-x11?  Is it just a packaging choice to keep qt4-x11  
> linuxy-like and thus framework-less?
qt4-x11 is more closely related to the Linux version of Qt than to
the Mac version.
There is no way for qt4-x11 to install frameworks.
Given that there would be no conflict, the frameworks from qt4-mac are put into
the ${frameworks_dir} directory.
They are soft links, however, to the actual installation location.
qt4-mac and qt4-x11 should both have the same libraries
(one .dylib and one .framework) in ${prefix}/libexec/${name}/lib
They should also have the same OpenGL capability.

Neither, of course, has anything to do with GLUT.

-Marcus





More information about the macports-users mailing list