1
1
mirror of https://github.com/wez/wezterm.git synced 2025-01-03 19:21:57 +03:00

add zlib dep for windows builds

This commit is contained in:
Wez Furlong 2019-03-23 11:14:53 -07:00
parent 72bcd42e48
commit df927a84fc
7 changed files with 15 additions and 7 deletions

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
[submodule "freetype/libpng"] [submodule "freetype/libpng"]
path = deps/freetype/libpng path = deps/freetype/libpng
url = https://github.com/glennrp/libpng.git url = https://github.com/glennrp/libpng.git
[submodule "deps/freetype/zlib"]
path = deps/freetype/zlib
url = https://github.com/madler/zlib.git

View File

@ -25,8 +25,8 @@ before_script:
script: script:
- "if [[ \"$TRAVIS_RUST_VERSION\" == \"stable\" ]] ; then cargo fmt --all -- --check ; else true ; fi" - "if [[ \"$TRAVIS_RUST_VERSION\" == \"stable\" ]] ; then cargo fmt --all -- --check ; else true ; fi"
- cargo build --verbose --all - cargo build --verbose
- cargo test --verbose --all - cargo test --verbose -p term -p termwiz -p wezterm -p base91 -p varbincode
addons: addons:
apt: apt:

View File

@ -1,5 +1,4 @@
use pkg_config; use pkg_config;
use std::env;
fn main() { fn main() {
if let Ok(lib) = pkg_config::Config::new() if let Ok(lib) = pkg_config::Config::new()

View File

@ -1,6 +1,13 @@
use cmake::Config; use cmake::Config;
use std::env; use std::env;
fn zlib() {
let mut config = Config::new("zlib");
let dst = config.profile("Release").build();
println!("cargo:rustc-link-search=native={}/lib", dst.display());
println!("cargo:rustc-link-lib=static=z");
}
fn libpng() { fn libpng() {
let mut config = Config::new("libpng"); let mut config = Config::new("libpng");
let dst = config.profile("Release").build(); let dst = config.profile("Release").build();
@ -18,13 +25,12 @@ fn freetype() {
println!("cargo:rustc-link-search=native={}/lib", dst.display()); println!("cargo:rustc-link-search=native={}/lib", dst.display());
println!("cargo:rustc-link-lib=static=freetype"); println!("cargo:rustc-link-lib=static=freetype");
println!("cargo:rustc-link-search=native=/usr/lib"); println!("cargo:rustc-link-search=native=/usr/lib");
// println!("cargo:rustc-link-lib=bz2");
println!("cargo:rustc-link-lib=z");
println!("cargo:include={}/include/freetype2", dst.display()); println!("cargo:include={}/include/freetype2", dst.display());
println!("cargo:lib={}/lib/libfreetype.a", dst.display()); println!("cargo:lib={}/lib/libfreetype.a", dst.display());
} }
fn main() { fn main() {
zlib();
libpng(); libpng();
freetype(); freetype();
let out_dir = env::var("OUT_DIR").unwrap(); let out_dir = env::var("OUT_DIR").unwrap();

1
deps/freetype/zlib vendored Submodule

@ -0,0 +1 @@
Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f

View File

@ -32,7 +32,6 @@ fn harfbuzz() {
println!("cargo:rustc-link-search=native={}/lib", dst.display()); println!("cargo:rustc-link-search=native={}/lib", dst.display());
println!("cargo:rustc-link-lib=static=harfbuzz"); println!("cargo:rustc-link-lib=static=harfbuzz");
println!("cargo:rustc-link-search=native=/usr/lib"); println!("cargo:rustc-link-search=native=/usr/lib");
println!("cargo:rustc-link-lib=z");
} }
fn main() { fn main() {

View File

@ -244,6 +244,6 @@ mod tests {
fn roundtrip_rgbcolor() { fn roundtrip_rgbcolor() {
let data = bincode::serialize(&RgbColor::from_named("DarkGreen").unwrap()).unwrap(); let data = bincode::serialize(&RgbColor::from_named("DarkGreen").unwrap()).unwrap();
eprintln!("serialized as {:?}", data); eprintln!("serialized as {:?}", data);
let decoded: RgbColor = bincode::deserialize(&data).unwrap(); let _decoded: RgbColor = bincode::deserialize(&data).unwrap();
} }
} }