Skip to content

Commit

Permalink
fix: fix path when using regenerate feature
Browse files Browse the repository at this point in the history
  • Loading branch information
oberrich committed Dec 29, 2024
1 parent b979063 commit 790e24f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,25 @@
pub mod ffi {
// use vendored bindings (only available for `x86_64` arch)
#[cfg_attr(docsrs, doc(cfg(not(feature = "regenerate"))))]
#[cfg(all(not(feature = "regenerate"), target_arch = "x86_64"))]
include!("ffi/x86_64_bindgen.rs");
#[cfg_attr(docsrs, doc(cfg(not(feature = "regenerate"))))]
#[cfg(all(not(feature = "regenerate"), target_arch = "x86"))]
include!("ffi/i686_bindgen.rs");
#[cfg_attr(docsrs, doc(cfg(not(feature = "regenerate"))))]
#[cfg(all(not(feature = "regenerate"), target_arch = "x86_64"))]
include!("ffi/x86_64_bindgen.rs");
#[cfg_attr(docsrs, doc(cfg(not(feature = "regenerate"))))]
#[cfg(all(not(feature = "regenerate"), target_arch = "aarch64"))]
include!("ffi/aarch64_bindgen.rs");

// use re-generated bindings
#[cfg_attr(docsrs, doc(cfg(feature = "regenerate")))]
#[cfg(feature = "regenerate")]
include!(concat!(env!("OUT_DIR"), "\\generated.rs"));
#[cfg(all(not(feature = "regenerate"), target_arch = "x86"))]
include!("ffi/i686_bindgen.rs");
#[cfg_attr(docsrs, doc(cfg(feature = "regenerate")))]
#[cfg(all(not(feature = "regenerate"), target_arch = "x86_64"))]
include!("ffi/x86_64_bindgen.rs");
#[cfg_attr(docsrs, doc(cfg(feature = "regenerate")))]
#[cfg(all(not(feature = "regenerate"), target_arch = "aarch64"))]
include!("ffi/aarch64_bindgen.rs");
}

/// Extensions to the bindings (useful functions, macros, etc.)
Expand Down

0 comments on commit 790e24f

Please sign in to comment.