diff options
| author | ruki <[email protected]> | 2024-03-31 23:11:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-31 23:11:56 +0800 |
| commit | 37e6c3d9841445b95abd283f4f67c842584df214 (patch) | |
| tree | 7154ca89ac74b2964520bbf80ce8e2ee57ecdc86 | |
| parent | 479ebb1da2792c84758dea5d6b9a025fba47a9fc (diff) | |
improve to find_qmake #4881
| -rw-r--r-- | xmake/modules/detect/sdks/find_qt.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua index d141eee3a..41448deb3 100644 --- a/xmake/modules/detect/sdks/find_qt.lua +++ b/xmake/modules/detect/sdks/find_qt.lua @@ -155,7 +155,8 @@ function _find_qmake(sdkdir, sdkver) if sdkver then sdkver = semver.try_parse(sdkver) if sdkver then - qmake = find_tool("qmake", {program = "qmake" .. sdkver:major(), paths = sdkdir and path.join(sdkdir, "bin")}) + local cachekey = "qmake-" .. sdkver:major() + qmake = find_tool("qmake", {program = "qmake" .. sdkver:major(), cachekey = cachekey, paths = sdkdir and path.join(sdkdir, "bin")}) end end @@ -164,7 +165,8 @@ function _find_qmake(sdkdir, sdkver) if not qmake then local suffixes = {"", "6", "-qt5"} for _, suffix in ipairs(suffixes) do - qmake = find_tool("qmake", {program = "qmake" .. suffix, paths = sdkdir and path.join(sdkdir, "bin")}) + local cachekey = "qmake-" .. suffix + qmake = find_tool("qmake", {program = "qmake" .. suffix, cachekey = cachekey, paths = sdkdir and path.join(sdkdir, "bin")}) if qmake then break end |
