Adding files to cmake project
Hello everyone,
I'm new to QT Creator and like to work with CMake. I have however not been able to figure out how to add a new file to my CMake project using QTC.
How I have been doing things so far:
1. Create new source file in QTC
2. Open CMakeLists in that directory in QTC (Open With->Plain Text Editor), add the new source file in CMakeLists
3. Reload the whole project in QTC to have the file appear in the side window.
Do I really have to reload the whole CMake project every time I add files?!
Also: Is there no syntax highlighting for CMake?
Thanks in advance,
xadian
Re: Adding files to cmake project
I have the same question about cmake project, and then I found a way to add files into it:
1. Right click project pane, and click "show in the explorer"
2. Add a new file, e.g. "new.c" in this dir
3. Back to QTC, and then right click on the project name, choose the "execute CMake"
4. In the popup window, click the button of "Execute CMake". When finished, the new file would show in our cmake project pane!
Hope this helpful, and I'm happy sharing this with you.