[Development] Build system for Qt 6

Richard Weickelt richard at weickelt.de
Sat Dec 8 00:15:50 CET 2018


> One really nice feature what I miss in cmake is the '-project' option from
> qmake. Basically it scans the current directory, adds all sources, headers
> and ui-files and creates a small .pro file out of it. It's a very convenient
> feature when you just want to compile a small test project. Creating an
> initial CMakeLists.txt from scratch takes much longer and therefore this is
> the only place where I use qmake (outside the qt sources)
> Maybe this can be added - simply read the current directory and pass the
> files found to a template CMakeLists.txt to create the project type you want
> - I assume not all ant to get a Qt project when such a feature would be
> added to cmake... :)

FWIW and since this thread is about build systems and everything evil in the
world: with Qbs you would just write something like

    import qbs

    Application {

        Depends { name: "cpp" }
        Depends { name: "Qt", submodules: [ "core", "gui" ] }
        files: "*"

    }

and you are done. The language is very efficient but yet comprehensible.

You could also use the built-in create-project command:
http://doc.qt.io/qbs/cli-create-project.html

Just in case you are in the mood to try out something off the mainstream
while waiting for a CMake solution. No need to bother with qmake at all.

Cheers
Richard



More information about the Development mailing list