mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
The name of a generated ui header follows the '#include' directive that requests it, not the location of the .ui file. That was not written down, and neither was the optional directory prefix such a directive may carry. CMake nevertheless has to predict the name at configure time, in order to register the generated header as a source of the targets in the directory. The prediction assumes that the include prefix matches the location of the .ui file relative to CMAKE_CURRENT_SOURCE_DIR, so it is wrong when the .ui file lies outside of that directory, or lies in a subdirectory but is included without a prefix. Document both, along with the resulting symptoms, and point to Qt's qt_add_ui() command, which takes the include prefix explicitly and therefore needs no prediction at all. Issue: #23523