Skip to content

tarruda/premake-pkgconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

pkg-config for premake

This module contains a pure lua implementation of the pkg-config utility that can be used in premake projects to query information about installed libraries.

To use it, simply install this module somewhere premake can find it. One way is to add it as a submodule of your premake project:

git submodule add https://github.com/tarruda/premake-pkgconfig pkgconfig

Then use pkgconfig.load to return a table with data about installed libraries:

local pkgconfig = require 'pkgconfig'
print(pkgconfig.load('zlib').cflags)
print(pkgconfig.load('glib-2.0').libs)

The load function will look for .pc files in a set of predefined search paths(see man pkg-config). Extra search paths can be provided either as the second argument or through the PKG_CONFIG_PATH environment variable:

pkgconfig.load('mylib', {'/opt/pkgconfig', '/home/user/pkgconfig'})

About

pkg-config for premake

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages