Is there any way to Link a custom library with pkg-config? For example: 'pkg-config --cflags --libs mono-2' but putting mono 2.8 files in a custom directory.I expect somthing like : 'pkg-config --cflags --libs ./mono.pc'
$ man pkg-config
In addition to specifying a package name on the command line, the full path to a given .pc file may be given instead. This allows a user to directly query a particular .pc file.
So yes, what you posted should work. Did you try it? Did you get an error? What version of pkg-config
? (mine is 0.26)
Alternatively, you can list additional package directories using the PKG_CONFIG_PATH
environment variable.