diff options
| author | ruki <[email protected]> | 2022-09-29 21:31:44 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-09-29 21:31:44 +0800 |
| commit | 7626a266bbefa72be1b1aac79f4c78e3ca48a9ac (patch) | |
| tree | 4e95934dfdb06d2c4921c26faa468fd42c4d637d | |
| parent | 23dd9bd16bc980c557f2752c399c0f759a2ca9ee (diff) | |
| parent | 4b3c3dc436ccc316db0219cf1cd4f175482eb555 (diff) | |
Merge pull request #2884 from shaoxie1986/dev
fix link error on linux when use qt4
| -rw-r--r-- | xmake/rules/qt/load.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/rules/qt/load.lua b/xmake/rules/qt/load.lua index ee4a3f601..7d641b134 100644 --- a/xmake/rules/qt/load.lua +++ b/xmake/rules/qt/load.lua @@ -39,7 +39,11 @@ function _link(target, linkdirs, framework, qt_sdkver) if qt_sdkver:ge("5.0") then framework = "Qt" .. qt_sdkver:major() .. framework:sub(3) .. (is_mode("debug") and debug_suffix or "") else -- for qt4.x, e.g. QtGui4.lib - framework = "Qt" .. framework:sub(3) .. (is_mode("debug") and debug_suffix or "") .. qt_sdkver:major() + if target:is_plat("windows", "mingw") then + framework = "Qt" .. framework:sub(3) .. (is_mode("debug") and debug_suffix or "") .. qt_sdkver:major() + else + framework = "Qt" .. framework:sub(3) .. (is_mode("debug") and debug_suffix or "") + end end if target:is_plat("android") then --> -lQt5Core_armeabi/-lQt5CoreDebug_armeabi for 5.14.x local libinfo = find_library(framework .. "_" .. config.arch(), linkdirs) |
