Using CMake to Build Qt Projects
-
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 )
-
Ah, it seems to be SET (QT_USE_QTDECLARATIVE TRUE)
-
Is it true that Qt plans to refuse the qmake and go to use cmake?
-
I suppose no, instead they are going to improve qmake... Or so I heard.
After all, by no means cmake isn't perfect either.
-
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.
-
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 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?
-
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.
-
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:-(
-
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 :)
-
[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?