From 49ef377349ba4dae840c2d5caa36e2d516707baa Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 20 Feb 2019 09:47:27 +0100 Subject: Fix determination of OpenGL include paths on macOS, take 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sysrootification of OpenGL include paths must be done only once: at configure time. The resolved paths are stored since 521a8539 and must not be resolved again. Turn the makeSpec-type opengl library into a custom-type one, and do the sysrootification in the handler function. Fixes: QTBUG-73736 Change-Id: I2933144057d6f01d8bfc7bda2c2df56c57303459 Reviewed-by: Edward Welbourne Reviewed-by: Eirik Aavitsland Reviewed-by: Tor Arne Vestbø --- src/gui/configure.json | 2 +- src/gui/configure.pri | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/configure.json b/src/gui/configure.json index 44140bc7b6..e4f25ab313 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -448,7 +448,7 @@ ], "sources": [ { "type": "pkgConfig", "args": "gl", "condition": "!config.darwin" }, - { "type": "makeSpec", "spec": "OPENGL" } + { "type": "openglMakeSpec" } ] }, "opengl_es2": { diff --git a/src/gui/configure.pri b/src/gui/configure.pri index 1b95449a10..0db106597e 100644 --- a/src/gui/configure.pri +++ b/src/gui/configure.pri @@ -15,6 +15,17 @@ defineTest(qtConfLibrary_freetype) { return(true) } +defineTest(qtConfLibrary_openglMakeSpec) { + darwin:sdk { + sysrootified = + for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val + QMAKE_INCDIR_OPENGL = $$sysrootified + } + $${1}.spec = OPENGL + !qtConfLibrary_makeSpec($$1, $$2): return(false) + return(true) +} + # Check for Direct X shader compiler 'fxc'. # Up to Direct X SDK June 2010 and for MinGW, this is pointed to by the # DXSDK_DIR variable. Starting with Windows Kit 8, it is included in -- cgit v1.2.3