Skip to content

Commit 4bacea5

Browse files
authored
feat(core): set MACOSX_DEPLOYMENT_TARGET environment variable, closes #2732 (#3496)
1 parent 17f17a8 commit 4bacea5

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-build": patch
3+
---
4+
5+
Automatically emit `cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET` with the value set on `tauri.conf.json > tauri > bundle > macos > minimumSystemVersion`.

core/tauri-build/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,13 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
240240
copy_resources(ResourcePaths::new(paths.as_slice(), true), target_dir)?;
241241
}
242242

243+
#[cfg(target_os = "macos")]
244+
{
245+
if let Some(version) = config.tauri.bundle.macos.minimum_system_version {
246+
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET={}", version);
247+
}
248+
}
249+
243250
#[cfg(windows)]
244251
{
245252
use anyhow::Context;

0 commit comments

Comments
 (0)