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
88order to use the system ` pkg-config ` tool (if available) to determine where a
99library is located.
1010
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+
1130``` rust
1231extern crate pkg_config;
1332
Original file line number Diff line number Diff line change 3030//!
3131//! # Example
3232//!
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):
3445//!
3546//! ```no_run
3647//! extern crate pkg_config;
4657//! extern crate pkg_config;
4758//!
4859//! 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();
5061//! }
5162//! ```
5263
You can’t perform that action at this time.
0 commit comments