diff options
| author | ruki <[email protected]> | 2022-12-25 13:07:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-12-25 13:07:38 +0800 |
| commit | 5b6d8a1aee248e676c27600ed13e6acaf0760fcd (patch) | |
| tree | bc6a8e2d7cb3a144bc64aa1b1f5d6636e0fc31fd | |
| parent | de12b43657040001a190afcfd2cbbc41afb8cb91 (diff) | |
disable qtplatform for qt6 #2791
| -rw-r--r-- | xmake/rules/qt/xmake.lua | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/xmake/rules/qt/xmake.lua b/xmake/rules/qt/xmake.lua index 16c54db33..21d3098c9 100644 --- a/xmake/rules/qt/xmake.lua +++ b/xmake/rules/qt/xmake.lua @@ -130,11 +130,16 @@ rule("qt.widgetapp_static") qt_sdkver = semver.new(qt.sdkver) end - -- get QtPlatformSupport/QtPlatformCompositorSupport for >=5.9 + -- @see -- https://github.com/xmake-io/xmake/issues/1047 + -- https://github.com/xmake-io/xmake/issues/2791 local QtPlatformSupport = "QtPlatformSupport" - if qt_sdkver and qt_sdkver:ge("5.9") then - QtPlatformSupport = "QtPlatformCompositorSupport" + if qt_sdkver then + if qt_sdkver:ge("5.9") then + QtPlatformSupport = "QtPlatformCompositorSupport" + elseif qt_sdkver:ge("6.0") then + QtPlatformSupport = nil + end end -- load some basic plugins and frameworks @@ -145,10 +150,16 @@ rule("qt.widgetapp_static") end if target:is_plat("macosx") then plugins.QCocoaIntegrationPlugin = {linkdirs = "plugins/platforms", links = {"qcocoa", "cups"}} - table.join2(frameworks, QtPlatformSupport, "QtWidgets") + table.insert(frameworks, "QtWidgets") + if QtPlatformSupport then + table.insert(frameworks, QtPlatformSupport) + end elseif target:is_plat("windows") then plugins.QWindowsIntegrationPlugin = {linkdirs = "plugins/platforms", links = {is_mode("debug") and "qwindowsd" or "qwindows"}} - table.join2(frameworks, "QtPrintSupport", QtPlatformSupport, "QtWidgets") + table.join2(frameworks, "QtPrintSupport", "QtWidgets") + if QtPlatformSupport then + table.insert(frameworks, QtPlatformSupport) + end elseif target:is_plat("wasm") then plugins.QWasmIntegrationPlugin = {linkdirs = "plugins/platforms", links = {"qwasm"}} table.join2(frameworks, "QtEventDispatcherSupport", "QtFontDatabaseSupport", "QtEglSupport") @@ -204,11 +215,16 @@ rule("qt.quickapp_static") qt_sdkver = semver.new(qt.sdkver) end - -- get QtPlatformSupport/QtPlatformCompositorSupport for >=5.9 + -- @see -- https://github.com/xmake-io/xmake/issues/1047 + -- https://github.com/xmake-io/xmake/issues/2791 local QtPlatformSupport = "QtPlatformSupport" - if qt_sdkver and qt_sdkver:ge("5.9") then - QtPlatformSupport = "QtPlatformCompositorSupport" + if qt_sdkver then + if qt_sdkver:ge("5.9") then + QtPlatformSupport = "QtPlatformCompositorSupport" + elseif qt_sdkver:ge("6.0") then + QtPlatformSupport = nil + end end -- load some basic plugins and frameworks @@ -216,10 +232,16 @@ rule("qt.quickapp_static") local frameworks = {"QtGui", "QtQuick", "QtQml", "QtQmlModels", "QtCore", "QtNetwork"} if target:is_plat("macosx") then plugins.QCocoaIntegrationPlugin = {linkdirs = "plugins/platforms", links = {"qcocoa", "cups"}} - table.join2(frameworks, QtPlatformSupport, "QtWidgets") + table.insert(frameworks, "QtWidgets") + if QtPlatformSupport then + table.insert(frameworks, QtPlatformSupport) + end elseif target:is_plat("windows") then plugins.QWindowsIntegrationPlugin = {linkdirs = "plugins/platforms", links = {is_mode("debug") and "qwindowsd" or "qwindows"}} - table.join2(frameworks, "QtPrintSupport", QtPlatformSupport, "QtWidgets") + table.join2(frameworks, "QtPrintSupport", "QtWidgets") + if QtPlatformSupport then + table.insert(frameworks, QtPlatformSupport) + end elseif target:is_plat("wasm") then plugins.QWasmIntegrationPlugin = {linkdirs = "plugins/platforms", links = {"qwasm"}} table.join2(frameworks, "QtEventDispatcherSupport", "QtFontDatabaseSupport", "QtEglSupport") |
