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