Commit a28773a
committed
build: add Qt6 runtime detection when os-version is unavailable
When /etc/os-version does not exist MAJOR_VERSION defaults to 99
Previously this always assumed Qt6 was available and set USE_QT6=yes
Now uses pkg-config --exists Qt6Core to check actual Qt6 installation
Falls back to Qt5 if Qt6Core is not found on the system
Also outputs HAS_QT6 status in the diagnostic logging section
Influence:
1. Build will correctly fallback to Qt5 when Qt6 is not installed
2. Prevents build failures on systems without /etc/os-version or Qt6
3. Diagnostic output now shows Qt6 detection result for debugging
4. MAJOR_VERSION >= 21 path remains unchanged
build: 在 os-version 不可用时添加 Qt6 运行时检测
当 /etc/os-version 不存在时 MAJOR_VERSION 默认为 99
此前始终假设 Qt6 可用并设置 USE_QT6=yes
现在使用 pkg-config --exists Qt6Core 检测 Qt6 实际安装情况
如果系统未安装 Qt6Core 则回退到 Qt5
同时在诊断日志中输出 HAS_QT6 检测状态
Influence:
1. 未安装 Qt6 时构建将正确回退到 Qt5
2. 防止在缺少 /etc/os-version 或 Qt6 的系统上构建失败
3. 诊断输出现在显示 Qt6 检测结果便于调试
4. MAJOR_VERSION >= 21 的路径保持不变1 parent ce8469e commit a28773a
1 file changed
Lines changed: 11 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 | | |
| |||
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| 47 | + | |
37 | 48 | | |
38 | 49 | | |
39 | 50 | | |
| |||
0 commit comments