Explorar el Código

catch2: fix ninja debug build

star9029 hace 10 meses
padre
commit
80ec65638f
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      packages/c/catch2/xmake.lua

+ 6 - 0
packages/c/catch2/xmake.lua

@@ -86,6 +86,7 @@ package("catch2")
                 elseif package:has_tool("cxx", "clang", "clangxx") then
                     main_component:add("ldflags", "-Wl,/subsystem:console")
                 end
+                os.mkdir(path.join(package:buildir(), "src/pdb"))
             end
 
             local configs = {"-DCATCH_INSTALL_DOCS=OFF", "-DCATCH_BUILD_TESTING=OFF", "-DCATCH_BUILD_EXAMPLES=OFF"}
@@ -98,6 +99,11 @@ package("catch2")
         else
             os.cp("single_include/catch2", package:installdir("include"))
         end
+
+        if package:is_plat("windows") and package:is_debug() then
+            local dir = package:installdir(package:config("shared") and "bin" or "lib")
+            os.cp(path.join(package:buildir(), "src/*.pdb"), dir)
+        end
     end)
 
     on_test(function (package)