Skip to content

Commit 56620ca

Browse files
committed
add a way to use ninja instead of vs (the -A x64 was rly breaking things)
1 parent f75ee37 commit 56620ca

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/cli.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ pub enum GeodeCommands {
8787
#[clap(long, short, default_value_t = false)]
8888
build_only: bool,
8989

90+
/// Whether to explicitly use Ninja instead of the VS generator (Windows only)
91+
#[clap(long, default_value_t = false)]
92+
ninja: bool,
93+
9094
/// Android NDK path, uses ANDROID_NDK_ROOT env var otherwise
9195
#[clap(long)]
9296
ndk: Option<String>,

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ fn main() {
5454
platform,
5555
configure_only,
5656
build_only,
57+
ninja,
5758
ndk,
5859
config,
5960
extra_conf_args,
6061
} => project_build::build_project(
6162
platform,
6263
configure_only,
6364
build_only,
65+
ninja,
6466
ndk,
6567
config,
6668
extra_conf_args,

src/project_build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub fn build_project(
66
platform: Option<PlatformName>,
77
configure_only: bool,
88
build_only: bool,
9+
ninja: bool,
910
ndk_path: Option<String>,
1011
config_type: Option<String>,
1112
extra_conf_args: Vec<String>,
@@ -72,6 +73,8 @@ pub fn build_project(
7273
}
7374

7475
conf_args.push("-DHOST_ARCH=x64".to_owned());
76+
} else if ninja {
77+
conf_args.extend(["-G", "Ninja"].map(String::from));
7578
} else {
7679
conf_args.extend(["-A", "x64"].map(String::from));
7780
}

0 commit comments

Comments
 (0)