From b26f537120e4138502529f3570ca82cea3043f3e Mon Sep 17 00:00:00 2001 From: Matthew Rodusek <7519129+bitwizeshift@users.noreply.github.com> Date: Sat, 16 Dec 2023 14:49:04 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Build=20`boxer-sys`=20with=20sta?= =?UTF-8?q?tic=20compilation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- frameworks/boxer-sys/build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frameworks/boxer-sys/build.rs b/frameworks/boxer-sys/build.rs index 4d31add..b11e810 100644 --- a/frameworks/boxer-sys/build.rs +++ b/frameworks/boxer-sys/build.rs @@ -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.