Skip to content

Commit

Permalink
0.5.3: Add DRED feature
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh committed Dec 1, 2024
1 parent c4ca085 commit 7472857
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opusic-sys"
version = "0.5.2"
version = "0.5.3"
authors = ["Douman <[email protected]>"]
description = "Bindings to libopus"
keywords = ["opus"]
Expand All @@ -23,3 +23,5 @@ optional = true
[features]
# Used internally to generate lib.rs
build-bindgen = ["bindgen"]
# Enables DRED feature
dred = []
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn set_cmake_define_if_present(config: &mut cmake::Config, name: &str) {
}

fn build() {
const CURRENT_DIR: &'static str = "opus";
const CURRENT_DIR: &str = "opus";

let mut cmake = cmake::Config::new(CURRENT_DIR);
cmake.define("OPUS_INSTALL_PKG_CONFIG_MODULE", "OFF")
Expand All @@ -96,6 +96,10 @@ fn build() {
.define("CMAKE_INSTALL_LIBDIR", "lib")
.define("CMAKE_TRY_COMPILE_TARGET_TYPE", "STATIC_LIBRARY");

if cfg!(feature = "dred") {
cmake.define("OPUS_DRED", "ON");
}

if let Some((toolchain_file, abi)) = get_android_vars() {
cmake.define("CMAKE_TOOLCHAIN_FILE", toolchain_file);
cmake.define("ANDROID_ABI", abi);
Expand Down

0 comments on commit 7472857

Please sign in to comment.