diff options
| author | ruki <[email protected]> | 2023-03-09 23:19:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-03-09 23:19:54 +0800 |
| commit | d5147e92e4642e94e27ff38628b5ce5a7d45fcba (patch) | |
| tree | 18aa65892169df37275f164630e94cab5f352336 | |
| parent | e70b450fc18f7ebf66abe23467fbe2f96be73553 (diff) | |
improve to find qmake from qt5base
| -rw-r--r-- | xmake/modules/detect/sdks/find_qt.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua index 315c57f55..8477a1a02 100644 --- a/xmake/modules/detect/sdks/find_qt.lua +++ b/xmake/modules/detect/sdks/find_qt.lua @@ -126,21 +126,24 @@ function _find_sdkdir(sdkdir, sdkver) if is_host("windows") and is_plat("android") then local qmake = find_file("qmake.bat", paths, {suffixes = subdirs}) if qmake then - return path.directory(path.directory(qmake)), path.filename(qmake) + return path.directory(path.directory(qmake)), qmake end end -- attempt to find qmake local qmake = find_file(is_host("windows") and "qmake.exe" or "qmake", paths, {suffixes = subdirs}) if qmake then - return path.directory(path.directory(qmake)), path.filename(qmake) + return path.directory(path.directory(qmake)), qmake end end -- find qmake function _find_qmake(sdkdir, sdkver) local sdkdir, qmakefile = _find_sdkdir(sdkdir, sdkver) - local qmake = find_tool(qmakefile or "qmake", {paths = sdkdir and path.join(sdkdir, "bin")}) + if qmakefile then + return qmakefile + end + local qmake = find_tool("qmake", {paths = sdkdir and path.join(sdkdir, "bin")}) if qmake then return qmake.program end |
