This will generate a simple pkgconfig file.

NAME <name>

This is the name of the pkgconfig module.

LIB_DIR <directory>

This is the directory where the library is linked to. This defaults to ${CMAKE_INSTALL_LIBDIR}.

INCLUDE_DIR <directory>

This is the include directory where the header file are installed. This defaults to ${CMAKE_INSTALL_INCLUDEDIR}.


A description about the library.

TARGETS <targets>...

The library targets to link.

CFLAGS <flags>...

Additionaly, compiler flags.

LIBS <library flags>...

Additional libraries to be linked.

REQUIRES <packages>...

List of other pkgconfig packages that this module depends on.


This will auto generate pkgconfig from a given target. All the compiler and linker flags come from the target.

NAME <name>

This is the name of the pkgconfig module. By default, this will use the project name.


This is the target which will be used to set the various pkgconfig fields.