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.
Here, KF5Archive is the name of the package.