libspng-0.7.4

#### Supplemental Linux® From Scratch - Version 13.0

### Chapter 8. Graphical Libraries

- Prev

  libliftoff-0.5.0

- Next

  libvpl-2.16.0

- Up
- Home

# libspng-0.7.4

## Introduction to libspng

The libspng package provides a C library for handling PNG files.

- Download: https://github.com/randy408/libspng/archive/v0.7.4/libspng-0.7.4.tar.gz

### libspng Dependencies

#### Required

CMake

## Installation of libspng

Install libspng by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr   \
          -D CMAKE_BUILD_TYPE=Release    \
          -D CMAKE_SKIP_INSTALL_RPATH=ON \
          -G Ninja .. &&

    ninja

Now, as the `root` user:

    ninja install

Now create a pkg-config file symlink for packages that expect `spng.pc` instead of `libspng.pc` as the `root` user:

    ln -sfv libspng.pc /usr/lib/pkgconfig/spng.pc

## Command Explanations

`-D CMAKE_SKIP_INSTALL_RPATH=ON`: This switch makes cmake remove hardcoded library search paths (rpath) when installing a binary executable file or a shared library. This package does not need rpath once it's installed into the standard location, and rpath may sometimes cause unwanted effects or even security issues.

## Contents

Installed Programs: None
Installed Libraries: libspng and libspng_static (static)
Installed Directories: /usr/lib/cmake/libspng

### Short Descriptions

`libspng` | provides functions that can help with handling PNG files

- Prev

  libliftoff-0.5.0

- Next

  libvpl-2.16.0

- Up
- Home