Selaa lähdekoodia

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
Jérôme Leclercq 1 vuosi sitten
vanhempi
commit
047930c32d
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      packages/b/bullet3/xmake.lua

+ 3 - 2
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)