< Guidelines and HOWTOs‎ | CMake
Revision as of 08:25, 28 July 2015 by *>Pippin (Created page with "This tutorial will show you how to use a [http://api.kde.org/frameworks-api/frameworks5-apidocs/ KDE Framework] in a CMake-based project. It will introduce you to searching fo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Guidelines and HOWTOs/CMake/Frameworks

This tutorial will show you how to use a KDE Framework in a CMake-based project. It will introduce you to searching for external packages in CMake, and linking to libraries provided by those packages.

This will assume a basic familiarity with CMake; if you are completely unfamiliar with CMake, you should check out the first CMake project tutorial.

We start off the CMakeLists.txt file with the lines any CMake project needs:

cmake_minimum_required(VERSION 2.8.12)
project(UsingFrameworksTutorial)

Next, we search for the framework we want to use. We'll pick KArchive, a framework for dealing with compressed file formats.

find_package(KF5Archive)

Here, KF5Archive is the name of the package.


This page was last edited on 10 March 2016, at 16:32. Content is available under Creative Commons License SA 4.0 unless otherwise noted.