瀏覽代碼

assimp: fix non-debug runtime build with asan (#5321)

star9029 11 月之前
父節點
當前提交
811c965fa8
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      packages/a/assimp/xmake.lua

+ 6 - 0
packages/a/assimp/xmake.lua

@@ -136,6 +136,12 @@ package("assimp")
             if minizip and not minizip:is_system() then
                 packagedeps = table.join2(packagedeps or {}, "minizip")
             end
+            -- fix ninja debug build
+            os.mkdir(path.join(package:buildir(), "code/pdb"))
+            -- MDd == _DEBUG + _MT + _DLL
+            if package:is_debug() and package:has_runtime("MD", "MT") then
+                io.replace("CMakeLists.txt", "/D_DEBUG", "", {plain = true})
+            end
         end
 
         local zlib = package:dep("zlib")