Skip to content

Commit

Permalink
Add visionOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
bitxeno committed Jul 21, 2024
1 parent f5ae86b commit 09e5a6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/build_targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl BuildTargets {
let shared_lib = targetdir.join(format!("lib{lib_name}.so"));
(shared_lib, static_lib, None, None, None)
}
("macos", _) | ("ios", _) | ("tvos", _) => {
("macos", _) | ("ios", _) | ("tvos", _) | ("visionos", _) => {
let static_lib = targetdir.join(format!("lib{lib_name}.a"));
let shared_lib = targetdir.join(format!("lib{lib_name}.dylib"));
(shared_lib, static_lib, None, None, None)
Expand Down
2 changes: 1 addition & 1 deletion src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl LibType {
| ("haiku", _)
| ("illumos", _)
| ("emscripten", _) => LibType::So,
("macos", _) | ("ios", _) | ("tvos", _) => LibType::Dylib,
("macos", _) | ("ios", _) | ("tvos", _) | ("visionos", _) => LibType::Dylib,
("windows", _) => LibType::Windows,
_ => unimplemented!("The target {}-{} is not supported yet", os, env),
}
Expand Down
2 changes: 1 addition & 1 deletion src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl Target {
} else {
format!("-Wl,-soname,lib{lib_name}.so")
});
} else if os == "macos" || os == "ios" || os == "tvos" {
} else if os == "macos" || os == "ios" || os == "tvos" || os == "visionos" {
let line = if capi_config.library.versioning {
format!("-Wl,-install_name,{1}/lib{0}.{5}.dylib,-current_version,{2}.{3}.{4},-compatibility_version,{5}",
lib_name, libdir.display(), major, minor, patch, sover)
Expand Down

0 comments on commit 09e5a6c

Please sign in to comment.