From 047930c32d79fa9f74f612f73fc87e0c4fe68be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Thu, 4 Jan 2024 03:13:48 +0100 Subject: [PATCH] bullet3: Fix vs_runtime (#3036) * bullet3: Fix vs_runtime Fixes a compilation issue when compiling bullet3 as a debug package with MD vs_runtime * Update xmake.lua --- packages/b/bullet3/xmake.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/b/bullet3/xmake.lua b/packages/b/bullet3/xmake.lua index da00fcc8e..7826c60e3 100644 --- a/packages/b/bullet3/xmake.lua +++ b/packages/b/bullet3/xmake.lua @@ -36,8 +36,9 @@ package("bullet3") table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DUSE_DOUBLE_PRECISION=" .. (package:config("double_precision") and "ON" or "OFF")) table.insert(configs, "-DBUILD_EXTRAS=" .. (package:config("extras") and "ON" or "OFF")) - if package:is_plat("windows") then - table.insert(configs, "-DUSE_MSVC_RUNTIME_LIBRARY_DLL=" .. (package:config("vs_runtime"):startswith("MD") and "ON" or "OFF")) + table.insert(configs, "-DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON") -- setting this to ON prevents Bullet from replacing flags + if package:is_plat("windows") and not package:config("vs_runtime"):endswith("d") then + table.insert(configs, "-DUSE_MSVC_RELEASE_RUNTIME_ALWAYS=ON") -- required to remove _DEBUG from cmake flags end import("package.tools.cmake").install(package, configs) end)