Fix determination of OpenGL include paths on macOS, take 3
The sysrootification of QMAKE_INCDIR_OPENGL on macOS must happen only
once. Commit 49ef3773
addressed this but stored the sysrootified
QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri. For installer packages,
these paths are the paths of the build machine and most likely wrong
on the user's machine.
This reverts commit 4949ef377349ba4dae840c2d5caa36e2d516707baa and
restores the sysrootification in sdk.prf. The original include paths
are assigned to QMAKE_EXPORT_INCDIR_OPENGL and stored as
QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri.
Fixes: QTBUG-75374
Task-number: QTBUG-73736
Change-Id: I4c0f65866d60660c632363dba3adc7ea2e344bfc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
a3acf568d1
commit
bbfc95914f
@ -17,7 +17,7 @@ QMAKE_EXTENSION_SHLIB = dylib
|
||||
QMAKE_EXTENSIONS_AUX_SHLIB = tbd
|
||||
QMAKE_LIBDIR =
|
||||
|
||||
# qtConfLibrary_openglMakeSpec will prefix the proper SDK sysroot
|
||||
# sdk.prf will prefix the proper SDK sysroot
|
||||
QMAKE_INCDIR_OPENGL = \
|
||||
/System/Library/Frameworks/OpenGL.framework/Headers \
|
||||
/System/Library/Frameworks/AGL.framework/Headers/
|
||||
|
@ -33,6 +33,13 @@ QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path)
|
||||
QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath)
|
||||
QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
|
||||
|
||||
isEmpty(QMAKE_EXPORT_INCDIR_OPENGL) {
|
||||
QMAKE_EXPORT_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL
|
||||
sysrootified =
|
||||
for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
|
||||
QMAKE_INCDIR_OPENGL = $$sysrootified
|
||||
}
|
||||
|
||||
QMAKESPEC_NAME = $$basename(QMAKESPEC)
|
||||
|
||||
# Resolve SDK version of various tools
|
||||
|
@ -786,6 +786,11 @@ defineTest(qtConfLibrary_makeSpec) {
|
||||
!qtConfResolvePathIncs($${1}.includedir, $$eval(QMAKE_INCDIR_$$spec), $$2): \
|
||||
return(false)
|
||||
|
||||
!isEmpty(QMAKE_EXPORT_INCDIR_$$spec) {
|
||||
$${1}.exportincludedir = $$eval(QMAKE_EXPORT_INCDIR_$$spec)
|
||||
export($${1}.exportincludedir)
|
||||
}
|
||||
|
||||
# note that the object is re-exported, because we resolve the libraries.
|
||||
|
||||
return(true)
|
||||
@ -953,7 +958,8 @@ defineTest(qtConfExportLibrary) {
|
||||
}
|
||||
defines = $$eval($${spfx}.defines)
|
||||
!isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
|
||||
includes = $$eval($${spfx}.includedir)
|
||||
includes = $$eval($${spfx}.exportincludedir)
|
||||
isEmpty(includes): includes = $$eval($${spfx}.includedir)
|
||||
!isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
|
||||
uses = $$eval($${lpfx}.dependencies)
|
||||
!isEmpty(uses) {
|
||||
|
@ -448,7 +448,7 @@
|
||||
],
|
||||
"sources": [
|
||||
{ "type": "pkgConfig", "args": "gl", "condition": "!config.darwin" },
|
||||
{ "type": "openglMakeSpec" }
|
||||
{ "type": "makeSpec", "spec": "OPENGL" }
|
||||
]
|
||||
},
|
||||
"opengl_es2": {
|
||||
|
@ -15,17 +15,6 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user