Build Automation – Using QMake for Non-Qt Projects

ccmake

So, I'm planning to write a C++ library and I want it to be cross-platform, and as this library won't deal with UI and I want it to have as little dependencies as possible, I won't be using Qt (actually Qt won't really help me to achieve what I want, all I plan on using is STL and Boost). Now when it comes to build a cross-platform project, I really like QMake as it's extremely easy to use and I have experience with it.
I also heard good things about CMake, though I really doubt it's as easy to use as QMake.

Anyway, here is my question: Should I stick with build automation tool that I know or is QMake just out of context for a non-Qt project? Should I take this as an opportunity to learn CMake? Or is there a better alternative to these two?

Best Answer

That choice is entirely up to you.

But I will point out that a very large number of Qt-based projects have moved away from QMake and switched to CMake, for various reasons. I will also point out that there is no technical reason that you can't use QMake if you prefer it.

Personally, I use CMake, because it quite well takes the role that autotools was once preferred for, doing so with a set of tools and a syntax that's far easier to understand and work in. But I see the appeal of using QMake - the syntax is much simpler and may perhaps be easier to understand and use than CMake.

Related Topic