[Development] Qt 5.5.0 build issue on OS X (10.9): OpenGL libraries

René J. V. Bertin rjvbertin at gmail.com
Sat Sep 12 18:16:54 CEST 2015


Thiago Macieira wrote:

> Maybe we need two tests: one for OpenGL for XCB plugin (with GLX support) and 
> one for OpenGL for the Cocoa plugin (AGL support).

I think that's what you get when using my approach:

doOpenGLDesktopTest() {
    if [ "$QT_QPA_DEFAULT_PLATFORM" = "cocoa" ] || \
       [ "$QT_QPA_DEFAULT_PLATFORM" = "" -a "$XPLATFORM_MAC" = "yes" ]; then
        # QT_QPA_DEFAULT_PLATFORM is either empty or set by the user,
        # so we have to check both manually and automatically selected cocoa.
        # It qpa=cocoa, we do NOT want to use pkg-config to find the OpenGL
        # libraries because it's too likely to find OpenGL libraries that are
        # not the system frameworks appropriate for cocoa mode.
        compileTest unix/opengldesktop "OpenGL"
    else
        compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL
    fi
}


> On Saturday 12 September 2015 10:03:09 René J.V. Bertin wrote:
>> Can anyone think of a case where you'd be building for Cocoa and NOT use
>> /System/Library/Frameworks/{OpenGL,AGL}.framework ?
> 
> When you're building against an SDK and therefore it's not the one in
> /System/Library.

Well, yes, but as long as you provide the appropriate SDK argument, -framework 
OpenGL -framework AGL will still link the correct framework, no?

R.




More information about the Development mailing list