This module is a simple generator for pkg-config files.
To use this module, just do: pkg = import('pkgconfig'). The following function will then be available as pkg.generate(). You can, of course, replace the name pkg with anything else.
The generated file's properties are specified with the following keyword arguments.
description a string describing the libraryextra_cflags a list of extra compiler flags to be added to the Cflags field after the header search pathfilebase, the base name to use for the pkg-config file, as an example the value of libfoo would produce a pkg-config file called libfoo.pcinstall_dir the directory to install to, defaults to the value of option libdir followed by /pkgconfiglibraries a list of built libraries (usually results of shared_library) that the user needs to link againstlibraries_private list of strings to put in the Libraries.private fieldname the name of this librarysubdirs which subdirs of include should be added to the header search path, for example if you install headers into ${PREFIX}/include/foobar-1, the correct value for this argument would be foobar-1requires list of strings to put in the Requires fieldrequires_private list of strings to put in the Requires.private fieldurl a string with a url for the libraryvariables a list of strings with custom variables to add to the generated file. The strings must be in the form name=value and may reference other pkgconfig variables, e.g. datadir=${prefix}/share. The names prefix, libdir and installdir are reserved and may not be used.version a string describing the version of this libraryd_module_versions a list of module version flags used when compiling D sources referred to by this pkg-config file