aboutsummaryrefslogtreecommitdiff
path: root/example/build.rs
diff options
context:
space:
mode:
authorTill Höppner2016-02-20 01:33:54 +0100
committerTill Höppner2016-02-20 01:33:54 +0100
commit280e70b37965797a41944ee876438176d98ca51a (patch)
treebd69cbf46a8587e42829eaa27dae10e71a0c43ea /example/build.rs
parent6996b19389701c1c8809827ec4349172302f12b1 (diff)
downloadincludedir-280e70b37965797a41944ee876438176d98ca51a.tar.gz
includedir-280e70b37965797a41944ee876438176d98ca51a.tar.xz
includedir-280e70b37965797a41944ee876438176d98ca51a.zip
Add passthrough option
Diffstat (limited to 'example/build.rs')
-rw-r--r--example/build.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/example/build.rs b/example/build.rs
index fb23001..c13f035 100644
--- a/example/build.rs
+++ b/example/build.rs
@@ -1,10 +1,15 @@
extern crate includedir_codegen;
+use std::env;
+
use includedir_codegen::Compression;
fn main() {
- includedir_codegen::start("FILES")
- .dir("data", Compression::Gzip)
- .build("data.rs")
- .unwrap();
+ let mut cg = includedir_codegen::start("FILES");
+ if env::var("PASSTHROUGH").is_ok() {
+ cg.passthrough();
+ }
+ cg.dir("data", Compression::Gzip)
+ .build("data.rs")
+ .unwrap();
}