CMake vs QMake. Which is better to use for new project?
-
Hi
QMake:- Knows Qt. handles UIC and moc running automatically
- Easy to learn.
- Full integration. Can use Wizards to generate forms etc.
- Harder to integrated 3rd part lib building as they rarely use QMake
CMake:
- Can do anything if you learn it well
- Easy to integrated 3rd party things if they also use CMake. (many do)
- Bad integration with Creator. You must manually insert new files etc.
- Need manual handling/setup of Qt extra tools. ( last time i checked. maybe better now)
- Complex language.
So I would say, if you know you want to use 3rd party libs, using CMake makes good sense.
-
To add to @mrjj :
qmake:
- supports iOS
- hard to support multiple libraries, 3rd party libs etc.
cmake:
- awful syntax
- it is the de-facto industry standard for c++
@bogong said in CMake vs QMake. Which is better to use for new project?:
Especially in case of Qt 6.
qmake will still be supported in Qt 6 for user apps. But in Qt 7 it is likely to be completely dropped.
But cmake support is sure to get far more love now and int the future. So for long-term projects - better use cmake. For short-term - up to you :-) And for projects supporting iOS - pick qmake. -
-
@bogong said in CMake vs QMake. Which is better to use for new project?:
@sierdzio Do you know something about implementing iOS/Android and Qt Creator integration for CMake soon? is there any plans?
Android already works.
iOS - I don't know but I suspect it will be fully supported by the time Qt 6 is released (end of year).
-
@mrjj said in CMake vs QMake. Which is better to use for new project?:
@sierdzio
So the wizards
will also work for adding classes to the project ?They already partially work (class files are added and copied into clipboard - so you can manually insert them in correct cmake file) and I expect it will get better soon. Qt Company is clearly putting a lot of effort into this area nowadays.
-
@sierdzio
So it generates files and pastes the file name to the clipboard so you can open the project file and
paste it there ?I guess it better than not working at all but still very silly that such a trivial thing can be an issue for a build generator system. 😜