Closed gavv closed 4 years ago
if I understand correctly, we need to create a libroc.pc
file in PKG_CONFIG_PATH
and prefix
, libdir
requires
are from scons options --prefix=PREFIX
, --libdir=LIBDIR
, not sure where do we get enabled dependencies, is it https://github.com/roc-project/roc/blob/master/SConstruct#L732 ? Thanks!
and it's just writing a file to a path like /usr/lib64/pkgconfig
not AddDistFile
which is installing a target library..?
if I understand correctly, we need to create a libroc.pc file in PKG_CONFIG_PATH and prefix, libdir requires are from scons options --prefix=PREFIX, --libdir=LIBDIR
Yes.
not sure where do we get enabled dependencies, is it https://github.com/roc-project/roc/blob/master/SConstruct#L732 ?
Yes. We should add dependencies which are:
env
using ParsePkgConfig
(which also defined the pkg-config dependency name)and it's just writing a file to a path like /usr/lib64/pkgconfig not AddDistFile which is installing a target library..?
I think we should add an AlwaysBuild action that generates libroc.pc file somewhere in the build
directory and then add this file to the install
target using AddDistFile()
thank you, I sent a pr #347
Merged.
scons install
should generate and install alibroc.pc
file for pkg-config.The file contents should be something like:
But paths (
/usr
,/usr/lib64
), version (0.1.3
), and dependencies (libuv libunwind
) should be generated dynamically according to the .version file, installation prefix, and enabled dependencies. All this info is already available inside scons.The file itself should be installed accordingly to the installation prefix and pkg-config default path. On my system it is
/usr/lib64/pkgconfig
.The generation function should be added somewhere under
site_scons/site_tools/roc
. This is our scons plugin which provided various helpers.This task is needed for our Go bindings: https://github.com/roc-project/roc-go/issues/4