Starting to work on auto sfml build locally
This commit is contained in:
parent
88f6f52eb4
commit
59172a14e7
|
@ -1,3 +1,4 @@
|
||||||
/target
|
/target
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
|
third-party
|
||||||
|
|
|
@ -2,10 +2,15 @@
|
||||||
name = "rusty"
|
name = "rusty"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Thomas Forgione <thomas@forgione.fr>"]
|
authors = ["Thomas Forgione <thomas@forgione.fr>"]
|
||||||
|
build = "prepare/build.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sfml = "0.14.0"
|
sfml = "0.14.0"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
git2 = "0.7.5"
|
||||||
|
cmake = "0.1"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "rusty-maker"
|
name = "rusty-maker"
|
||||||
path = "src/app/game.rs"
|
path = "src/app/game.rs"
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
extern crate git2;
|
||||||
|
|
||||||
|
use git2::Repository;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let sfml = match Repository::open("third-party/sfml") {
|
||||||
|
Ok(repo) => repo,
|
||||||
|
Err(_) => {
|
||||||
|
Repository::clone("https://github.com/sfml/sfml", "third-party/sfml")
|
||||||
|
.expect("Couldn't clone SFML")
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let csfml = match Repository::open("third-party/csfml") {
|
||||||
|
Ok(repo) => repo,
|
||||||
|
Err(_) => {
|
||||||
|
Repository::clone("https://github.com/sfml/csfml", "third-party/csfml")
|
||||||
|
.expect("Couldn't clone CSFML")
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue