From 64106c4d3d4ddba8c7bc2af75376e6d3d3d75601 Mon Sep 17 00:00:00 2001
From:
Date: Mon, 29 Jun 2015 20:16:15 +0000
Subject: Update documentation
---
pkg_config/fn.find_library.html | 102 +++++++++++++++++++
pkg_config/fn.target_supported.html | 101 +++++++++++++++++++
pkg_config/index.html | 189 ++++++++++++++++++++++++++++++++++++
pkg_config/sidebar-items.js | 1 +
pkg_config/struct.Config.html | 127 ++++++++++++++++++++++++
pkg_config/struct.Library.html | 117 ++++++++++++++++++++++
6 files changed, 637 insertions(+)
create mode 100644 pkg_config/fn.find_library.html
create mode 100644 pkg_config/fn.target_supported.html
create mode 100644 pkg_config/index.html
create mode 100644 pkg_config/sidebar-items.js
create mode 100644 pkg_config/struct.Config.html
create mode 100644 pkg_config/struct.Library.html
(limited to 'pkg_config')
diff --git a/pkg_config/fn.find_library.html b/pkg_config/fn.find_library.html
new file mode 100644
index 0000000..a8f3626
--- /dev/null
+++ b/pkg_config/fn.find_library.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+pub fn find_library(name: &str) -> Result<Library, String>
Simple shortcut for using all default options for finding a library.
+
+
+
+pub fn target_supported() -> bool
+
+
+A build dependency for Cargo libraries to find system artifacts through the
+pkg-config
utility.
+
+
This library will shell out to pkg-config
as part of build scripts and
+probe the system to determine how to link to a specified library. The
+Config
structure serves as a method of configuring how pkg-config
is
+invoked in a builder style.
+
+
A number of environment variables are available to globally configure how
+this crate will invoke pkg-config
:
+
+
+PKG_CONFIG_ALLOW_CROSS
- if this variable is not set, then pkg-config
+will automatically be disabled for all cross compiles.
+FOO_NO_PKG_CONFIG
- if set, this will disable running pkg-config
when
+probing for the library named foo
.
+
+
+
There are also a number of environment variables which can configure how a
+library is linked to (dynamically vs statically). These variables control
+whether the --static
flag is passed. Note that this behavior can be
+overridden by configuring explicitly on Config
. The variables are checked
+in the following order:
+
+
+FOO_STATIC
- pass --static
for the library foo
+FOO_DYNAMIC
- do not pass --static
for the library foo
+PKG_CONFIG_ALL_STATIC
- pass --static
for all libraries
+PKG_CONFIG_ALL_DYNAMIC
- do not pass --static
for all libraries
+
+
+
After running pkg-config
all appropriate Cargo metadata will be printed on
+stdout if the search was successful.
+
+
+
Find the system library named foo
.
+
+extern crate pkg_config;
+
+fn main() {
+ pkg_config::find_library("foo").unwrap();
+}
+
+
+
Configure how library foo
is linked to.
+
+extern crate pkg_config;
+
+fn main() {
+ pkg_config::Config::new().statik(true).find("foo").unwrap();
+}
+
+
+
+
+
+
+pub struct Config {
+ // some fields omitted
+}
Methods
+
Creates a new set of configuration options which are all initially set
+to "blank".
+
fn statik(&mut self, statik: bool) -> &mut Config
+
Indicate whether the --static
flag should be passed.
+
+
This will override the inference from environment variables described in
+the crate documentation.
+
+
Indicate that the library must be at least version vers
.
+
+
Add an argument to pass to pkg-config.
+
+
It's placed after all of the arguments generated by this library.
+
+
Run pkg-config
to find the library name
.
+
+
This will use all configuration previously set to specify how
+pkg-config
is run.
+
+
Run pkg-config
to get the value of a variable from a package using
+--variable.
+
Trait Implementations
Derived Implementations
+
+
+pub struct Library {
+ pub libs: Vec<String>,
+ pub link_paths: Vec<PathBuf>,
+ pub frameworks: Vec<String>,
+ pub framework_paths: Vec<PathBuf>,
+ pub include_paths: Vec<PathBuf>,
+ pub version: String,
+ // some fields omitted
+}
Fields
+
+ libs | |
+ link_paths | |
+ frameworks | |
+ framework_paths | |
+ include_paths | |
+ version | |
Trait Implementations
Derived Implementations
+