From 9e55ab1d39bf987d7df87a027c4331e9be309d09 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 28 Mar 2022 10:02:40 +0200 Subject: Add ability to customize pkg-config header and library search paths Specifically, {cc,c,cxx}.pkgconfig.{include,lib} variables specify header (-I) and library (-L) search paths to use in the generated .pc files instead of the default install.{include,lib}. Relative paths are resolved as install paths. --- doc/manual.cli | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/manual.cli b/doc/manual.cli index 910ca0a..36e36bd 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -2353,6 +2353,27 @@ the \c{details/} subdirectory with the \c{utility.hxx} header, then this header would have been installed as \c{.../include/libhello/details/utility.hxx}. +\N|By default the generated \c{pkg-config} files will contain +\c{install.include} and \c{install.lib} directories as header (\c{-I}) and +library (\c{-L}) search paths, respectively. However, these can be customized +with the \c{{c,cxx\}.pkgconfig.{include,lib\}} variables. For example, +sometimes we may need to install headers into a subdirectory of the include +directory but include them without this subdirectory: + +\ +# Install headers into hello/libhello/ subdirectory of, say, +# /usr/include/ but include them as . +# +hxx{*}: +{ + install = include/hello/libhello/ + install.subdirs = true +} + +lib{hello}: cxx.pkgconfig.include = include/hello/ +\ + +| \h2#intro-operations-dist|Distributing| @@ -6508,12 +6529,12 @@ config.c config.cxx cc.id - c.target - c.target.cpu - c.target.vendor - c.target.system - c.target.version - c.target.class + cc.target + cc.target.cpu + cc.target.vendor + cc.target.system + cc.target.version + cc.target.class config.cc.poptions cc.poptions -- cgit v1.1