Skip to content

Commit

Permalink
fix: adjust build script to check for docs.rs build (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jul 10, 2023
1 parent baa0297 commit 0d7b66e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
// Copyright 2021-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0

use std::env::var;

fn main() {
// link carbon hotkey on macOS
{
if std::env::var("CARGO_CFG_TARGET_OS").map_or(false, |os| os == "macos") {
if var("DOCS_RS").map_or(true, |f| f != "1")
&& var("CARGO_CFG_TARGET_OS").map_or(false, |os| os == "macos")
{
println!("cargo:rustc-link-lib=framework=Carbon");
cc::Build::new()
.file("src/platform_impl/macos/carbon_hotkey/carbon_hotkey_binding.c")
Expand Down

0 comments on commit 0d7b66e

Please sign in to comment.