Skip to content

Commit

Permalink
add dlopen Cargo feature using dlib to load fontconfig at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Be-ing committed Feb 15, 2022
1 parent d1ea5fc commit 41dd7d3
Show file tree
Hide file tree
Showing 7 changed files with 435 additions and 394 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rust:
- nightly
- beta
- stable
- 1.38.0
- 1.40.0

jobs:
allow_failures:
Expand Down
7 changes: 6 additions & 1 deletion fontconfig-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "yeslogic-fontconfig-sys"
version = "2.11.2"
edition = "2018"
authors = [
"Austin Bonander <[email protected]>",
"The Servo Project Developers",
Expand All @@ -16,7 +17,6 @@ homepage = "https://github.com/yeslogic/fontconfig-rs"
documentation = "https://docs.rs/crate/yeslogic-fontconfig-sys"
repository = "https://github.com/yeslogic/fontconfig-rs"

build = "build.rs"
links = "fontconfig"

[badges]
Expand All @@ -27,6 +27,11 @@ name = "fontconfig_sys"

[dependencies]
const-cstr = "0.3"
dlib = "0.5.0"
lazy_static = { verison = "1.4.0", optional = true }

[features]
dlopen = [ "lazy_static" ]

[build-dependencies]
pkg-config = "0.3"
1 change: 1 addition & 0 deletions fontconfig-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extern crate pkg_config;

fn main() {
#[cfg(not(feature = "dlopen"))]
pkg_config::find_library("fontconfig").unwrap();
}
Loading

0 comments on commit 41dd7d3

Please sign in to comment.