Commit 6c2b689
committed
fix: resolve duplicate compilation issue by removing redundant install
1. Remove CHAMELEON_PATH definition and usage from CMakeLists.txt
2. Replace compile-time CHAMELEON_PATH with runtime path calculation
using QGuiApplication::applicationDirPath()
3. Change install directive from copying entire plugin directory to only
installing qmldir file
4. This prevents duplicate files during installation and resolves
recompilation issues
The changes address a problem where redundant installation content
was causing repeatable compilation problems. By removing the compile-
time path definition and dynamically calculating the path at runtime,
we eliminate dependency on build-time paths. Additionally, installing
only the qmldir file instead of the entire plugin directory prevents
duplicate file conflicts during installation.
Influence:
1. Verify that examples can still find and load Chameleon plugins at
runtime
2. Test that QML import paths are correctly set in both exhibition and
qml-inspect examples
3. Confirm that plugin installation only includes necessary qmldir file
4. Check that style settings work correctly across different Qt versions
5. Validate that no duplicate files are created during build/install
process
fix: 解决重复编译问题,移除冗余安装内容
1. 从 CMakeLists.txt 中移除 CHAMELEON_PATH 定义和使用
2. 使用 QGuiApplication::applicationDirPath() 运行时路径计算替换编译
时 CHAMELEON_PATH
3. 将安装指令从复制整个插件目录改为仅安装 qmldir 文件
4. 这防止了安装过程中的重复文件问题并解决了重新编译问题
这些更改解决了冗余安装内容导致可重复编译的问题。通过移除编译时路径定义并
在运行时动态计算路径,我们消除了对构建时路径的依赖。此外,仅安装 qmldir
文件而不是整个插件目录可以防止安装过程中的重复文件冲突。
Influence:
1. 验证示例程序在运行时仍能找到并加载 Chameleon 插件
2. 测试 exhibition 和 qml-inspect 示例中的 QML 导入路径是否正确设置
3. 确认插件安装仅包含必要的 qmldir 文件
4. 检查样式设置在不同 Qt 版本中是否正常工作
5. 验证构建/安装过程中不会创建重复文件1 parent c37db5d commit 6c2b689
4 files changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | | - | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
0 commit comments