build: Fixed QT6 build for macosx (#13510)

This commit is contained in:
holub 2025-03-22 19:40:50 -04:00 committed by GitHub
parent e95cdde8e9
commit c709a0f124
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -498,14 +498,23 @@ function osdmodulestargetconf()
"Qt5Widgets.dll",
}
elseif _OPTIONS["targetos"]=="macosx" then
local qt_version = str_to_version(backtick("qmake -query QT_VERSION"))
linkoptions {
"-F" .. backtick("qmake -query QT_INSTALL_LIBS"),
}
links {
"Qt5Core.framework",
"Qt5Gui.framework",
"Qt5Widgets.framework",
}
if qt_version < 60000 then
links {
"Qt5Core.framework",
"Qt5Gui.framework",
"Qt5Widgets.framework",
}
else
links {
"QtCore.framework",
"QtGui.framework",
"QtWidgets.framework",
}
end
else
if _OPTIONS["QT_HOME"]~=nil then
local qt_version = str_to_version(backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_VERSION"))