What problem does it solve?
This Skill unifies and simplifies Deepin's Qt/CMake dual-version build configuration by automatically detecting Qt5/Qt6 and mapping DTK versions to the active Qt version, eliminating hard-coded references.
Core Features & Use Cases
- Dual-version support: Builds for both Qt5 and Qt6 environments (V20 and V25) from the same codebase.
- Dynamic DTK mapping: Automatically maps DTK versions to the detected Qt version to ensure correct dependencies.
- No hard-coded version references: Centralizes version handling to reduce maintenance and errors.
- Use Case: When maintaining a Deepin project that needs V25/Qt6 and V20/Qt5 compatibility, this skill ensures builds adapt automatically.
Quick Start
To enable dual Qt support in your CMake project, integrate the detection logic at the top of your CMakeLists.txt and replace hard-coded Qt and DTK references with the dynamic variables Qt${QT_VERSION_MAJOR} and Dtk${DTK_VERSION_MAJOR}.