diff --git a/Cargo.toml b/Cargo.toml index 8aee37e..116982d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "offscreen_gl_context" license = "MIT / Apache-2.0" -version = "0.7.1" +version = "0.8.0" authors = ["Emilio Cobos Álvarez ", "The Servo Project Developers"] description = "Creation and manipulation of HW accelerated offscreen rendering contexts in multiple platforms. Originally intended for the Servo project's WebGL implementation." repository = "https://github.com/emilio/rust-offscreen-rendering-context" diff --git a/build.rs b/build.rs index 6d7faa4..3acc153 100644 --- a/build.rs +++ b/build.rs @@ -13,6 +13,7 @@ fn main() { let mut file = File::create(&dest.join("glx_bindings.rs")).unwrap(); Registry::new(Api::Glx, (1, 4), Profile::Core, Fallbacks::All, []) .write_bindings(gl_generator::StaticGenerator, &mut file).unwrap(); + println!("cargo:rustc-link-lib=GL"); } if target.contains("android") || (target.contains("linux") && cfg!(feature = "test_egl_in_linux")) { @@ -46,6 +47,10 @@ fn main() { ]) .write_bindings(gl_generator::StructGenerator, &mut file).unwrap(); + println!("cargo:rustc-link-lib=opengl32"); + } + if target.contains("darwin") { + println!("cargo:rustc-link-lib=framework=OpenGL"); } }