shake-language-c-0.6.2: Utilities for cross-compiling with Shake

Safe HaskellNone
LanguageHaskell98

Development.Shake.Language.C.PkgConfig

Description

This module provides utilities for querying BuildFlags from the pkg-config database, which is available on many Unix like operating systems.

Synopsis

Documentation

data Options Source

PkgConfig options.

Constructors

Options 

Fields

searchPath :: Maybe [FilePath]

List of directories where .pc files are searched, corresponding to the PKG_CONFIG_PATH environment variable

static :: Bool

Return flags appropriate for static linking

defaultOptions :: Options Source

Default pkg-config options.

This function is an alias for def.

pkgConfig :: Options -> String -> Action (BuildFlags -> BuildFlags) Source

Call pkg-config with options and a package name and return a BuildFlags modification function.

The pkg-config executable must be installed on the build host.

fromConfig :: Options -> (String -> Action (Maybe String)) -> Action (BuildFlags -> BuildFlags) Source

Given an initial Options record and a configuration variable lookup function, call pkg-config based on configuration variable settings and return a BuildFlags modification function.

The following configuration variables are recognised:

PkgConfig.packages
List of package names for which build flags should be queried
PkgConfig.options.searchPath
Space-separated list of file paths, corresponds to the searchPath option
PkgConfig.options.static
true or false, corresponds to the static option