# CMake Error: AUTOGEN: No valid Qt 'uic' executable found for target 'myapp'

- **ID:** `cmake/autogen-uic-not-found`
- **Domain:** cmake
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 82%

## Root Cause

Qt5/Qt6 AUTOMOC/AUTOUIC/AUTORCC requires uic binary in PATH or via Qt5_DIR/Qt6_DIR, but it's missing or version mismatched.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Qt5 5.15.2 | active | — | — |
| Qt6 6.5.0 | active | — | — |
| CMake 3.28 | active | — | — |
| CMake 3.29 | active | — | — |

## Workarounds

1. **Install Qt development tools: sudo apt install qtbase5-dev qtbase5-dev-tools (or qttools5-dev for uic). Then reconfigure.** (85% success)
   ```
   Install Qt development tools: sudo apt install qtbase5-dev qtbase5-dev-tools (or qttools5-dev for uic). Then reconfigure.
   ```
2. **Explicitly set the uic path in CMake: set(QT_UIC_EXECUTABLE /usr/lib/qt5/bin/uic) before find_package(Qt5).** (75% success)
   ```
   Explicitly set the uic path in CMake: set(QT_UIC_EXECUTABLE /usr/lib/qt5/bin/uic) before find_package(Qt5).
   ```

## Dead Ends

- **Reinstall Qt and set CMAKE_PREFIX_PATH to the install root** — If only the library is installed without the development tools (uic, moc), find_package(Qt5) might succeed but uic is still missing. (30% fail)
- **Set CMAKE_AUTOUIC OFF and manually run uic** — Turning off AUTOUIC bypasses the error but leaves UI compilation unhandled, causing linker errors later. (40% fail)
