Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "projectm"
version = "3.1.0"
version = "3.1.2"
edition = "2021"
rust-version = "1.65"
authors = ["AnomieVision <[email protected]>", "Mischa Spiegelmock <[email protected]>"]
Expand All @@ -13,8 +13,8 @@ readme = "README.md"

[dependencies]
libc = "0.2"
#projectm-sys = { path = "projectm-sys", version = "1.0.9-rc.1", features = ["playlist"] }
projectm-sys = { version = "1.2.1" }
#projectm-sys = { path = "projectm-sys", version = "1", features = ["playlist", "static"] }
projectm-sys = { version = "1" }
rand = "0.8"

[features]
Expand Down
5 changes: 1 addition & 4 deletions projectm-sys/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[target.wasm32-unknown-emscripten]
linker = ".cargo/linker-emscripten"

[target.x86_64-unknown-linux-gnu]
rustflags = "-C link-arg=-lGL -C link-arg=-lstdc++ -C link-arg=-lgomp"
linker = ".cargo/linker-emscripten"
2 changes: 1 addition & 1 deletion projectm-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "projectm-sys"
version = "1.2.1"
version = "1.2.2"
edition = "2021"
rust-version = "1.65"
authors = ["AnomieVision <[email protected]>", "Mischa Spiegelmock <[email protected]>"]
Expand Down
27 changes: 25 additions & 2 deletions projectm-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn build_shared_libs_flag() -> &'static str {
if cfg!(feature = "static") {
"OFF" // Disable shared libs to enable static linking
} else {
"ON" // Enable shared libs
"ON" // Enable shared libs
}
}

Expand Down Expand Up @@ -182,6 +182,29 @@ fn main() {
}
}

// Platform-specific link flags for C++ and OpenGL
#[cfg(target_os = "macos")]
{
println!("cargo:rustc-link-lib=c++");
println!("cargo:rustc-link-lib=framework=OpenGL");
}
#[cfg(target_os = "linux")]
{
// On Linux, link stdc++ and GL.
println!("cargo:rustc-link-lib=stdc++");
println!("cargo:rustc-link-lib=GL");
println!("cargo:rustc-link-lib=gomp");
}
#[cfg(target_os = "windows")]
{
println!("cargo:rustc-link-lib=opengl32");
}
#[cfg(target_os = "emscripten")]
{
// Emscripten typically handles GL calls differently, so you might skip or rely on the
// emscripten compiler for linking.
}

// Generate Rust bindings using bindgen
bindgen();
}
}
Loading