[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 10:03:09 CEST 2015


On Saturday September 12 2015, Hanspeter Niederstrasser wrote regarding "Re: [Development] Qt 5.5.0 build issue on OS X (10.9): OpenGL libraries"

Hi,

>https://bugreports.qt.io/browse/QTBUG-47146
>
>It's definitely a problem caused by pkg-config if your pkg-config is set 
>to search your X11 installation by default (using PKG_CONFIG_LIBDIR at 

Yes, and that means that in the current state of things you cannot rely on pkg-config to find "system" libraries if you have the X11 OpenGL library installed among those.

>least can override the default). A conditional that *doesn't* use 
>pkg-config to find OpenGL on Cocoa would be very nice.

The conditional I posted earlier is very simple: do not use pkg-config when building for the "macx" platform or when building the cocoa qpa plugin. Instead, fall back to the simpler compileTest (which Qt 5.4.2 used in this case) and rely on the fact that the true system OpenGL libraries 1) have a fixed name and 2) will be found without "us" having to search for them. That's also why I said I already contributed a patch; the hardest part was figuring out the correct conditional expression (and then of course putting it into a function because there are 2 places where compileTestWithPkgConfig has to be replaced).

Can anyone think of a case where you'd be building for Cocoa and NOT use /System/Library/Frameworks/{OpenGL,AGL}.framework ?

R.



More information about the Development mailing list