What is a package config file?

What is a package config file?

The packages. config file is used in some project types to maintain the list of packages referenced by the project. This allows NuGet to easily restore the project’s dependencies when the project is to be transported to a different machine, such as a build server, without all those packages.

Where is PKG_CONFIG_PATH?

PKG_CONFIG_PATH is a environment variable that specifies additional paths in which pkg-config will search for its . pc files. This variable is used to augment pkg-config’s default search path. On a typical Unix system, it will search in the directories /usr/lib/pkgconfig and /usr/share/pkgconfig .

Where are pkg config files stored in freedesktop?

The primary use of pkg-config is to provide the necessary details for compiling and linking a program to a library. This metadata is stored in pkg-config files. These files have the suffix .pc and reside in specific locations known to the pkg-config tool. This will be described in more detail later.

Do you need to package.pc files in PKG?

You will need to package the .pc files from your dependencies. You can adjust the PKG_CONFIG_PATH to let pkg-config tool locate them. With this approach you will patch the .pc files from B and C before packaging them. The goal is to replace the absolute path (the variable part of the path) with a variable placeholder.

How is the package name determined in pkg-config?

The package name is determined through the filename of the pkg-config metadata file. This is the portion of the filename prior to the .pc suffix. A common choice is to match the library name to the .pc name.

Which is the best version field for pkg-config?

The Version field is a bit trickier to ensure that it is usable by consumers of the data. pkg-config uses the algorithm from RPM for version comparisons. This works best with a dotted decimal number such as 1.2.3 since letters can cause unexpected results.