Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Using CMake to Build Qt Projects
Forum Updated to NodeBB v4.3 + New Features

Using CMake to Build Qt Projects

Scheduled Pinned Locked Moved Qt Creator and other tools
11 Posts 5 Posters 7.2k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    riussi
    wrote on last edited by
    #1

    Thanks to Johan Thelin for the "article":http://developer.qt.nokia.com/quarterly/view/using_cmake_to_build_qt_projects in Qt Quarterly.

    One question: is there a variable to add the declarative module to the used modules list like for example network:

    SET ( QT_USE_QTOPENGL TRUE )

    Juha Ristolainen (@Riussi)

    1 Reply Last reply
    0
    • R Offline
      R Offline
      riussi
      wrote on last edited by
      #2

      Ah, it seems to be SET (QT_USE_QTDECLARATIVE TRUE)

      Juha Ristolainen (@Riussi)

      1 Reply Last reply
      0
      • I Offline
        I Offline
        IrQX
        wrote on last edited by
        #3

        Is it true that Qt plans to refuse the qmake and go to use cmake?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Smar
          wrote on last edited by
          #4

          I suppose no, instead they are going to improve qmake... Or so I heard.

          After all, by no means cmake isn't perfect either.

          1 Reply Last reply
          0
          • I Offline
            I Offline
            IrQX
            wrote on last edited by
            #5

            BTW, now a learning cmake as replacement for qmake for Qt projects. And I can say, that cmake is more powerful and flexible tool as making tool. But for small projects like "calculator" qmake better.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sabrog
              wrote on last edited by
              #6

              I like idea using QtScript instead .pro files. Good "article":http://labs.trolltech.com/blogs/2009/10/14/to-make-or-not-to-make-qmake-and-beyond-redux/.

              QT - Apple QuickTime
              Qt - Nokia's Qt Development Frameworks
              Apple is a competitor of Nokia, so QT != Qt

              1 Reply Last reply
              0
              • I Offline
                I Offline
                IrQX
                wrote on last edited by
                #7

                [quote author="SABROG" date="1280994372"]I like idea using QtScript instead .pro files. Good "article":http://labs.trolltech.com/blogs/2009/10/14/to-make-or-not-to-make-qmake-and-beyond-redux/.[/quote]

                Why this way is better than CMake?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Smar
                  wrote on last edited by
                  #8

                  CMake's syntax is a bit unintuitive and if you need to do anything besides declarations, it gets pretty messy unless you want to put quite a bit time to write modules...

                  Or that's how I think about it.

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tobias.hunger
                    wrote on last edited by
                    #9

                    Smar: "if you need to do anything besides declarations, it gets pretty messy" does unfortunately describe pretty much any build system I ever had to deal with:-(

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Smar
                      wrote on last edited by
                      #10

                      Yeah, see, I'm not suggesting to use anything... So far I have been using CMake as it has done its done job well, whatever I have needed to do. It doesn't mean I like it, though :)

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        IrQX
                        wrote on last edited by
                        #11

                        [quote author="Smar" date="1281084862"]CMake's syntax is a bit unintuitive and if you need to do anything besides declarations, it gets pretty messy unless you want to put quite a bit time to write modules...

                        Or that's how I think about it.
                        [/quote]

                        Ok, Smar, this is an option form in CMake for build/update translations.

                        @option (UPDATE_TRANSLATIONS "Update source translation *.ts files (WARNING: make clean will delete the source .ts files! Danger!)")

                        if (UPDATE_TRANSLATIONS)
                        QT4_CREATE_TRANSLATION(QM_FILES ${TRANSLATIONS})
                        else (UPDATE_TRANSLATIONS)
                        QT4_ADD_TRANSLATION(QM_FILES ${TRANSLATIONS})
                        endif (UPDATE_TRANSLATIONS) @

                        What replacement for it will be in QtScript as buldsystem or other stuff?

                        1 Reply Last reply
                        0

                        • Login

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