fundamental / rtosc

Realtime Safe OSC packet serialization and dispatch
https://fundamental-code.com/wiki/rtosc/
MIT License
85 stars 16 forks source link

pkg-config definition correctly setup? #42

Closed dvzrv closed 5 years ago

dvzrv commented 5 years ago

While creating a package of the 0.2.0 release for Arch Linux I ran into some oddities: When looking at the pkg-config configuration file, it looks like it's not possible to setup libdir to be /usr/lib.

When choosing cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib-DPERF_TEST=ON to have make install the libraries below /usr/lib and not /usr/lib64, the pkg-config file still looks like the following:

#
# pkgconfig for rtosc
#

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}
includedir=${prefix}/include

Name: rtosc
Description: rtosc - a realtime safe open sound control serialization and dispatch system
Version: 0.2.0
Libs: -L${libdir} -lrtosc
Cflags: -I${includedir}

Which in turn produces:

pkg-config --libs librtosc
-L/usr -lrtosc 

I believe, that libdir should rather be the composition of ${prefix} and @CMAKE_INSTALL_LIBDIR@.

To speak in terms of the initial file, this all is generated from: libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@