File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,25 @@ A simple library meant to be used as a build dependency with Cargo packages in
8
8
order to use the system ` pkg-config ` tool (if available) to determine where a
9
9
library is located.
10
10
11
+ You can use this crate directly to probe for specific libraries, or use
12
+ [ metadeps] ( https://github.com/joshtriplett/metadeps ) to declare all your
13
+ ` pkg-config ` dependencies in ` Cargo.toml ` .
14
+
15
+ # Example
16
+
17
+ Find the system library named ` foo ` , with minimum version 1.2.3:
18
+
19
+ ``` rust
20
+ extern crate pkg_config;
21
+
22
+ fn main () {
23
+ pkg_config :: Config :: new (). atleast_version (" 1.2.3" ). probe (" foo" ). unwrap ();
24
+ }
25
+ ```
26
+
27
+ Find the system library named ` foo ` , with no version requirement (not
28
+ recommended):
29
+
11
30
``` rust
12
31
extern crate pkg_config;
13
32
Original file line number Diff line number Diff line change 30
30
//!
31
31
//! # Example
32
32
//!
33
- //! Find the system library named `foo`.
33
+ //! Find the system library named `foo`, with minimum version 1.2.3:
34
+ //!
35
+ //! ```no_run
36
+ //! extern crate pkg_config;
37
+ //!
38
+ //! fn main() {
39
+ //! pkg_config::Config::new().atleast_version("1.2.3").probe("foo").unwrap();
40
+ //! }
41
+ //! ```
42
+ //!
43
+ //! Find the system library named `foo`, with no version requirement (not
44
+ //! recommended):
34
45
//!
35
46
//! ```no_run
36
47
//! extern crate pkg_config;
46
57
//! extern crate pkg_config;
47
58
//!
48
59
//! fn main() {
49
- //! pkg_config::Config::new().statik(true).probe("foo").unwrap();
60
+ //! pkg_config::Config::new().atleast_version("1.2.3"). statik(true).probe("foo").unwrap();
50
61
//! }
51
62
//! ```
52
63
You can’t perform that action at this time.
0 commit comments