From f1c5e98201e4c2d7684a388596979ce862788a9e Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Wed, 27 May 2015 10:59:12 -0700 Subject: [PATCH] Use Cargo metadata to find include dirs --- Cargo.toml | 4 ++++ makefile.cargo | 21 +++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index aad7d67..500417f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,10 @@ git = "https://github.com/servo/rust-egl" git = "https://github.com/servo/rust-freetype" +[dependencies.freetype-sys] + +git = "https://github.com/servo/libfreetype2" + [dependencies.core_foundation] git = "https://github.com/servo/rust-core-foundation" diff --git a/makefile.cargo b/makefile.cargo index e3c3790..4fac1ac 100644 --- a/makefile.cargo +++ b/makefile.cargo @@ -59,19 +59,16 @@ CXXFLAGS += \ $(NULL) endif -SKIA_OUTDIR = $(shell find $(OUT_DIR)/../.. -name 'skia-*' -type d)/out -FREETYPE_OUTDIR = $(shell find $(OUT_DIR)/../.. -name 'freetype-sys-*' -type d)/out - CXXFLAGS += \ - -I $(FREETYPE_OUTDIR)/include \ - -iquote $(SKIA_OUTDIR)/include \ - -iquote $(SKIA_OUTDIR)/include/core \ - -iquote $(SKIA_OUTDIR)/include/config \ - -iquote $(SKIA_OUTDIR)/include/effects \ - -iquote $(SKIA_OUTDIR)/include/ports \ - -iquote $(SKIA_OUTDIR)/include/utils \ - -iquote $(SKIA_OUTDIR)/include/gpu \ - -iquote $(SKIA_OUTDIR)/include/gpu/gl \ + -I "$(DEP_FREETYPE_OUTDIR)/include" \ + -iquote "$(DEP_SKIA_OUTDIR)/include" \ + -iquote "$(DEP_SKIA_OUTDIR)/include/core" \ + -iquote "$(DEP_SKIA_OUTDIR)/include/config" \ + -iquote "$(DEP_SKIA_OUTDIR)/include/effects" \ + -iquote "$(DEP_SKIA_OUTDIR)/include/ports" \ + -iquote "$(DEP_SKIA_OUTDIR)/include/utils" \ + -iquote "$(DEP_SKIA_OUTDIR)/include/gpu" \ + -iquote "$(DEP_SKIA_OUTDIR)/include/gpu/gl" \ -DUSE_SKIA \ -DUSE_SKIA_GPU