This forum has been archived. All content is frozen. Please use KDE Discuss instead.

What is the reason of using CMake in KDE softwares?

Tags: None
(comma "," separated)
Farid010
Registered Member
Posts
5
Karma
1
I am a newcomer to the KDE community.
I see that KDE uses CMake for compiling the software source codes and I am trying to understand the reason of it. I have read in the CMake official website that CMake makes the compilation process machine independent. However, we can simply use a Qt project and run it in different machines. I have done it for small projects and it works fine. So my question is that why do we need to use CMake?
User avatar
zachus
Registered Member
Posts
56
Karma
0
OS

no one knows

Thu Dec 20, 2018 5:53 am
ure asking too many questions o)

just use it and stuff will compile

sorry this is a bad answer LOL


louis94
Registered Member
Posts
99
Karma
1
OS
Hi Farid010,

When Kde was started, there was no such thing as qmake (what you call Qt projects) and autotools was the most widespread build system on Linux, so it was picked up. All Kde apps used autotools until ten years ago, when a switch to CMake was initiated. CMake is much easier-to-use than autotools, while providing the same level of functionality. This blog post is an interesting reading about why the migration happened.

Today, Kde projects could probably switch to qmake. But building apps with complex dependencies and compile-time options isn't a trivial task, so it would take a lot of work. Moreover, all Kde devs and downstream distro packagers are used to CMake and probably don't want to change. Some projects don't even use Qt (eg Eigen) so qmake isn't an option for them.

Long story short, it was a choice made in 2007 that has become a tradition for Kde software. Since everyone is happy with CMake and no far superior alternative exists, there's no reason to use anything else.

Louis


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]