#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 29. Introduction to KDE

- Prev

  KDE Preliminaries

- Next

  Phonon-4.12.0

- Up
- Home

# extra-cmake-modules-6.11.0

## Introduction to Extra Cmake Modules

The Extra Cmake Modules package contains extra CMake modules used by KDE Frameworks and other packages.

This package is known to build and work properly using an LFS 12.3 platform.

### Package Information

- Download (HTTP): https://download.kde.org/stable/frameworks/6.11/extra-cmake-modules-6.11.0.tar.xz

- Download MD5 sum: 22bce8bd85c1ead07bda8a00518d1120

- Download size: 320 KB

- Estimated disk space required: 9.5 MB

- Estimated build time: less than 0.1 SBU

### Extra Cmake Modules Dependencies

#### Required

CMake-3.31.5

#### Recommended

Qt-6.8.2

#### Optional

sphinx-8.2.1 (for building documentation), PyQt (experimental support for building KDE Python bindings), and ReuseTool (for running internal tests)

## Installation of Extra Cmake Modules

Install Extra Cmake Modules by running the following commands:

    sed -i '/"lib64"/s/64//' kde-modules/KDEInstallDirsCommon.cmake &&

    sed -e '/PACKAGE_INIT/i set(SAVE_PACKAGE_PREFIX_DIR "${PACKAGE_PREFIX_DIR}")' \
        -e '/^include/a set(PACKAGE_PREFIX_DIR "${SAVE_PACKAGE_PREFIX_DIR}")' \
        -i ECMConfig.cmake.in &&

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr -D BUILD_WITH_QT6=ON .. &&
    make

This package does not come with a test suite.

### Note

Unlike other KF6 packages, this module is installed in /usr because it can be used by some non-KF6 packages.

Now, as the `root` user:

    make install

## Command Explanations

sed ... Modules/KDEInstallDirs.cmake: This command disables applications using cmake from attempting to install files in a `lib64` sub-directory.

sed ... ECMConfig.cmake.in: This command protects the global cmake variable `PACKAGE_PREFIX_DIR` from being changed when checking ECM presence: since we install ECM into `/usr`, the check would set that variable to `/usr`, while most KDE packages expect it to be set to `/opt/kf6` and would fail to build if it is set to something else.

## Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/share/ECM and /usr/share/doc/ECM (if documentation was built)

- Prev

  KDE Preliminaries

- Next

  Phonon-4.12.0

- Up
- Home