From 78d6312394a672bb1be3c6aa39dd8425fa322686 Mon Sep 17 00:00:00 2001 From: InvalidString Date: Mon, 16 Oct 2023 18:32:04 +0200 Subject: [PATCH] when linking dynamically raylib should BUILD_SHARED_LIBS --- build/bind.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/bind.rs b/build/bind.rs index 96f1691..cda6824 100644 --- a/build/bind.rs +++ b/build/bind.rs @@ -10,6 +10,10 @@ pub fn compile_raylib(raylib_path: &str) { .define("BUILD_EXAMPLES", "OFF") .define("CMAKE_BUILD_TYPE", "Release"); + if cfg!(feature = "dylib") { + cmake_config.define("BUILD_SHARED_LIBS", "ON"); + } + // Set the correct build profile #[cfg(debug_assertions)] {