Skip to content

Commit 2e6b934

Browse files
authored
Merge pull request #112 from geode-catgirls/main
sapphire sdk changes 👀
2 parents 5db1d44 + c899cba commit 2e6b934

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/project_build.rs

+9
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ pub fn build_project(
113113
conf_args.push("-DGEODE_DONT_INSTALL_MODS=1".into());
114114
}
115115
}
116+
PlatformName::IOS => {
117+
if cross_compiling && cfg!(not(target_os = "macos")) {
118+
fatal!("Sorry! but we do not know of any way to cross-compile to iOS when not using MacOS.");
119+
}
120+
conf_args.push("-DCMAKE_SYSTEM_NAME=iOS".into());
121+
conf_args.push("-DGEODE_TARGET_PLATFORM=iOS".into());
122+
// TODO: cli cant install to a mobile device, yet
123+
conf_args.push("-DGEODE_DONT_INSTALL_MODS=1".into());
124+
}
116125
}
117126

118127
let build_type = config_type.unwrap_or_else(|| {

src/util/mod_file.rs

+5
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ pub enum PlatformName {
231231
Android,
232232
Android32,
233233
Android64,
234+
IOS,
234235
}
235236

236237
impl PlatformName {
@@ -243,6 +244,8 @@ impl PlatformName {
243244
Some(PlatformName::Windows)
244245
} else if cfg!(target_os = "macos") {
245246
Some(PlatformName::MacOS)
247+
} else if cfg!(target_os = "ios") {
248+
Some(PlatformName::IOS)
246249
} else {
247250
None
248251
}
@@ -260,6 +263,7 @@ impl Display for PlatformName {
260263
P::Android => "android",
261264
P::Android32 => "android32",
262265
P::Android64 => "android64",
266+
P::IOS => "ios",
263267
})
264268
}
265269
}
@@ -274,6 +278,7 @@ fn all_platforms() -> HashSet<PlatformName> {
274278
P::Android,
275279
P::Android32,
276280
P::Android64,
281+
P::IOS,
277282
])
278283
}
279284

0 commit comments

Comments
 (0)