Commit 10e6024
fix(build): detect Qt6 availability when os-version is missing
When /etc/os-version does not exist, MAJOR_VERSION defaults to 99,
which incorrectly selects Qt6 due to 99 > 20 being true.
Add a pkg-config check for Qt6Core to determine actual Qt6 availability,
preventing build failures on systems without Qt6 installed.
当 /etc/os-version 不存在时,MAJOR_VERSION 默认为 99,
由于 99 > 20 为真会错误地选择 Qt6。
新增通过 pkg-config 检测 Qt6Core 是否实际安装的逻辑,
避免在未安装 Qt6 的系统上构建失败。
Influence:
1. 修复了 /etc/os-version 缺失时 Qt 版本选择错误的问题
2. 确保在没有 Qt6 的环境中正确回退到 Qt5 构建1 parent 4ee1bea commit 10e6024
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
0 commit comments