Reputation: 11
My build environment: MacOSX 10.14.1 Qt 5.11.2 Qt Creator 4.7.1 CMake 3.12.2
I am a bit new to using CMake with Qt. I don't really know why I'm doing this instead of just using QMake as QMake does everything I need it to do.
My main problem is that when I create a new project and select CMake as the build tool, the Qt Creator shows the project window and the CMake GUI pops up. I then click the configure and generate buttons and then close the CMake UI. The spinning icon next to my project name stops and then the only file that is listed there is CMakelists.txt.
I have seen some of the video tutorials and when the CMake build environment is selected the project files are automatically generated and are listed in the project pane without the host doing anything special.
How do I get CMake to work with Qt like that shown in the tutorial videos?
Thank you.
Upvotes: 0
Views: 298
Reputation: 11
Found the answer. I had to reset the CMake setting in my Kits to point correctly to the CMake that I had on my system using absolute paths.
on Mac:
Step 1
Qt Creator (Menu item) -> Preferences -> Kits -> CMake Selected CMake that I want and made it default
Step 2
Qt Creator (Menu item) -> Preferences -> Kits -> Kits Select the Kits that you have installed and set the CMake property to the CMake that you set as default in Step 1.
Upvotes: 1