I'm porting a legacy C++ + Qt project to CMake and as a first step I do not want to touch the original project tree, so that the CMake project can be a drop-in patch that just extends the original project.
However, the original project tree stores UI files in a dedicated folder that's separated from all the source and header files.
I've tried setting CMAKE_AUTOUIC_SEARCH_PATHS
to point to the UI folder, as mentioned in this earlier question, and also pass the list of UI files to qt_wrap_ui
. However, none of these tricks had any effect, and I never manage to get the CMake project to generate the ui_ source files.
Does anyone know if there's a way to get cmake to reliably generate source files from Qt's ui stashed in any arbitrary folder within the project tree?