Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. CMake vs QMake. Which is better to use for new project?
QtWS25 Last Chance

CMake vs QMake. Which is better to use for new project?

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 4 Posters 17.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bogong
    wrote on last edited by bogong
    #1

    Hello all!
    I've got curious about CMake vs QMake? Which is better to use for new application for Mobile/Desktop? What is advantage/disadvantage of both? Suggestions? Especially in case of Qt 6.

    sierdzioS 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      5
      • B bogong

        Hello all!
        I've got curious about CMake vs QMake? Which is better to use for new application for Mobile/Desktop? What is advantage/disadvantage of both? Suggestions? Especially in case of Qt 6.

        sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        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.

        (Z(:^

        B 1 Reply Last reply
        5
        • B Offline
          B Offline
          bogong
          wrote on last edited by bogong
          #4

          @mrjj and @sierdzio thx for reply. I've just tested default QtQuick application for iOS and got +2000 warnings and failed on deploy on iOS simulator. And it's just default and empty QML application from wizard based on CMake. It's looking awful for now.

          1 Reply Last reply
          0
          • sierdzioS sierdzio

            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.

            B Offline
            B Offline
            bogong
            wrote on last edited by bogong
            #5

            @sierdzio Do you know something about implementing iOS/Android and Qt Creator integration for CMake soon? is there any plans?

            sierdzioS 1 Reply Last reply
            0
            • B bogong

              @sierdzio Do you know something about implementing iOS/Android and Qt Creator integration for CMake soon? is there any plans?

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @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).

              (Z(:^

              mrjjM B 2 Replies Last reply
              1
              • sierdzioS sierdzio

                @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).

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @sierdzio
                So the wizards
                will also work for adding classes to the project ?

                sierdzioS 1 Reply Last reply
                0
                • mrjjM mrjj

                  @sierdzio
                  So the wizards
                  will also work for adding classes to the project ?

                  sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #8

                  @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.

                  (Z(:^

                  mrjjM 1 Reply Last reply
                  1
                  • sierdzioS sierdzio

                    @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.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @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. 😜

                    T 1 Reply Last reply
                    1
                    • sierdzioS sierdzio

                      @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).

                      B Offline
                      B Offline
                      bogong
                      wrote on last edited by bogong
                      #10

                      @sierdzio Yes - Just tested. Default QML application on CMake is working for Android emulator. Issue closed.

                      1 Reply Last reply
                      0
                      • mrjjM mrjj

                        @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. 😜

                        T Offline
                        T Offline
                        Taupter
                        wrote on last edited by Taupter
                        #11

                        @mrjj December 2021, Qt 6.2.2, Creator 6.0. Still copies file names to clipboard so you can add them manually to Cmake.

                        1 Reply Last reply
                        1

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved