Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Using CMake build system

From Qt Wiki
Revision as of 18:01, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

CMake

CMake – the cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice.

You can use it instead qmake, native Qt buid system. In this article i describe base functionality, that usualy used to build simple project.

qmake typical *.pro file

As you can see, this project consists from 4 files. Three of them is implementing MainWindow class and one is main.cpp file.

CMakeLists.txt for same project

You may use CMake, but most of people advice, not to use CMake for simple projects, because qmake build system functionality is more than enough for simple projects.

Project using CMake

  • KDE SC
  • Second Life

Links