Skip to content

Commit

Permalink
🔨 Build boxer-sys with static compilation
Browse files Browse the repository at this point in the history
The `boxer-sys` library was previously building and linking as a dylib,
but this is posing a challenge for linking the binary into the final
application.

In an effort to correct the issues, this is being changed into a
static binary so that the code is linked directly into the executable.
  • Loading branch information
bitwizeshift committed Dec 16, 2023
1 parent db83738 commit b26f537
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frameworks/boxer-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ fn compile_boxer() {

cfg
.define("CMAKE_INSTALL_LIBDIR", "lib")
.define("BUILD_SHARED_LIBS", "1");
.define("BUILD_SHARED_LIBS", "0");

let dst = cfg.build();

println!("cargo:rustc-link-search={}", dst.join("lib").display());
println!("cargo:rustc-link-lib=dylib=Boxer");
build::rustc_link_search!("native={}", dst.join("lib").display());
build::rustc_link_lib!("static=Boxer");
}

// Generates bindgen bindings for GLFW.
Expand Down

0 comments on commit b26f537

Please sign in to comment.