opusfile icon indicating copy to clipboard operation
opusfile copied to clipboard

Generate pkg-config files under CMake

Open daddesio opened this issue 3 years ago • 0 comments

configure_pkg_config_file helper function copied from the ogg repository.

The generated .pc files have two differences (presumably minor) compared to autotools:

  • Paths: Autotools outputs exec_prefix=${prefix}, libdir=${exec_prefix}/lib, etc. while the CMake output is expanded out (similar to what ogg does currently)
  • Version string: Autotools outputs 0.12-38-gcf218fb-dirty if a modified repository is detected, while CMake ignores this and outputs 0.12-38-gcf218fb

opusfile.pc output:

# opusfile installed pkg-config file

prefix=/home/build/opus-git-optimized/prefix
exec_prefix=/home/build/opus-git-optimized/prefix/bin
libdir=/home/build/opus-git-optimized/prefix/lib64
includedir=/home/build/opus-git-optimized/prefix/include

Name: opusfile
Description: High-level Opus decoding library
Version: 0.12-38-gcf218fb
Requires.private: ogg >= 1.3 opus >= 1.0.1
Conflicts:
Libs: -L${libdir} -lopusfile
Libs.private: -lm
Cflags: -I${includedir}/opus

opusurl.pc output:

# opusurl installed pkg-config file

prefix=/home/build/opus-git-optimized/prefix
exec_prefix=/home/build/opus-git-optimized/prefix/bin
libdir=/home/build/opus-git-optimized/prefix/lib64
includedir=/home/build/opus-git-optimized/prefix/include

Name: opusurl
Description: High-level Opus decoding library, URL support
Version: 0.12-38-gcf218fb
Requires: opusfile
Requires.private: openssl
Conflicts:
Libs: -L${libdir} -lopusurl

daddesio avatar Jul 06 '22 06:07 daddesio