Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
alisomay committed Nov 28, 2024
1 parent 7f1af6c commit f164780
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libpd-sys"
version = "0.3.3"
version = "0.3.4"
authors = ["alisomay <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand Down
18 changes: 12 additions & 6 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ fn main() {

#[cfg(target_os = "windows")]
{
// Determine the appropriate CRT linkage
let profile = std::env::var("PROFILE").unwrap();
let crt_linkage = if profile == "release" {
"MultiThreadedDLL"
let msvc_runtime_flag = if profile == "release" {
"/MD" // Multithreaded DLL
} else {
"MultiThreadedDebugDLL"
"/MDd" // Multithreaded Debug DLL
};

// For windows we need to link pthread.
Expand Down Expand Up @@ -148,16 +149,21 @@ fn main() {
.define("LIBPD_RS_EXTRA", LIBPD_RS_EXTRA)
.define("PTHREADS_LIB", pthread_lib_path.to_str().unwrap())
.define("PTHREADS_INCLUDE_DIR", pthread_include.to_str().unwrap())
.define("CMAKE_MSVC_RUNTIME_LIBRARY", crt_linkage)
.cflag(format!("-DWISH={}", WISH))
.cflag(format!("-I{}", libpd_wrapper_dir.to_str().unwrap()))
.cflag(format!("-I{}", pd_source.to_str().unwrap()))
.cflag(format!("-DPD_FLOATSIZE={PD_FLOATSIZE}"))
.no_build_target(true)
.always_configure(true)
.very_verbose(true)
.build();
.very_verbose(true);

let lib_destination = if target_info.compiler.unwrap() == "msvc" {
lib_destination.cflag(msvc_runtime_flag)
} else {
lib_destination
};

let lib_destination = lib_destination.build();
let library_root = lib_destination.join("build/libs");

// Look for pthread
Expand Down

0 comments on commit f164780

Please sign in to comment.