diff options
| author | ruanc <[email protected]> | 2026-01-11 00:15:21 +0800 |
|---|---|---|
| committer | ruanc <[email protected]> | 2026-01-11 00:15:21 +0800 |
| commit | 98b400ca2ed607695b65905044446c3946489fe5 (patch) | |
| tree | f6726e0194ea4cb51c304dc6207b275b92d30783 /xmake/modules/detect | |
| parent | ce65d3bdeb6f4a450a0a6e0d1a51e54daccd69c8 (diff) | |
feat(qt): support dynamic mkspec selection for Qt SDK
- Add mkspec variable to store QMAKE_XSPEC or QMAKE_SPEC from Qt environment
- Include mkspec in the returned Qt SDK information table
- Use dynamic mkspec path instead of hardcoded platform-specific paths
- Remove hardcoded mkspec directory paths for macosx, linux, windows, android and wasm platforms
- Add include directories using the dynamic mkspec path for proper Qt compilation
Diffstat (limited to 'xmake/modules/detect')
| -rw-r--r-- | xmake/modules/detect/sdks/find_qt.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua index c47fc3f69..e0aa3b03d 100644 --- a/xmake/modules/detect/sdks/find_qt.lua +++ b/xmake/modules/detect/sdks/find_qt.lua @@ -287,6 +287,7 @@ function _find_qt(sdkdir, sdkver, sdkdir_host) local pluginsdir = qtenvs.QT_INSTALL_PLUGINS local includedir = qtenvs.QT_INSTALL_HEADERS local mkspecsdir = qtenvs.QMAKE_MKSPECS or path.join(qtenvs.QT_HOST_DATA, "mkspecs") + local mkspec = qtenvs.QMAKE_XSPEC or qtenvs.QMAKE_SPEC -- for 6.2 local bindir_host = qtenvs.QT_HOST_BINS if not bindir_host and libexecdir and is_plat("android", "iphoneos") then @@ -316,7 +317,7 @@ function _find_qt(sdkdir, sdkver, sdkdir_host) end end - return {sdkdir = sdkdir, bindir = bindir, bindir_host = bindir_host, libexecdir = libexecdir, libexecdir_host = libexecdir_host, libdir = libdir, includedir = includedir, qmldir = qmldir, pluginsdir = pluginsdir, mkspecsdir = mkspecsdir, sdkver = sdkver} + return {sdkdir = sdkdir, bindir = bindir, bindir_host = bindir_host, libexecdir = libexecdir, libexecdir_host = libexecdir_host, libdir = libdir, includedir = includedir, qmldir = qmldir, pluginsdir = pluginsdir, mkspecsdir = mkspecsdir, mkspec = mkspec, sdkver = sdkver} end -- find qt sdk toolchains |
