From 09d42155f500a525aecba23737bd2e9ce456c941 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 4 Jul 2022 17:07:26 -0400 Subject: [PATCH] explicitly set architecture for macos srt cmake build (#100) --- srt/srt-sys/build.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/srt/srt-sys/build.rs b/srt/srt-sys/build.rs index 84c5eec5..09f80ee3 100644 --- a/srt/srt-sys/build.rs +++ b/srt/srt-sys/build.rs @@ -6,6 +6,13 @@ fn main() { build.define("ENABLE_APPS", "OFF").define("ENABLE_SHARED", "OFF"); if target_os == "macos" { + build.define( + "CMAKE_OSX_ARCHITECTURES", + match target_arch.as_str() { + "aarch64" => "arm64", + arch => arch, + }, + ); build.define("OPENSSL_INCLUDE_DIR", format!("{}/vendor/openssl/include", env!("CARGO_MANIFEST_DIR"))); build.define( "OPENSSL_CRYPTO_LIBRARY",