From bddeeebacf319b82b6afdd64fc2fa48f76bd25eb Mon Sep 17 00:00:00 2001 From: star9029 Date: Fri, 27 Sep 2024 09:26:17 +0800 Subject: [PATCH] rttr: fix debug build with msvc + ninja --- packages/r/rttr/xmake.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/r/rttr/xmake.lua b/packages/r/rttr/xmake.lua index 00aaa90ce..c028a1ae7 100644 --- a/packages/r/rttr/xmake.lua +++ b/packages/r/rttr/xmake.lua @@ -32,9 +32,15 @@ package("rttr") table.insert(configs, "-DBUILD_RTTR_DYNAMIC=" .. (shared and "ON" or "OFF")) table.insert(configs, "-DBUILD_STATIC=" .. (shared and "OFF" or "ON")) table.insert(configs, "-DBUILD_WITH_RTTI=" .. (package:config("rtti") and "ON" or "OFF")) + + if package:is_plat("windows") then + os.mkdir(path.join(package:buildir(), "src/rttr/pdb")) + end import("package.tools.cmake").install(package, configs) if package:is_plat("windows") and shared then package:add("defines", "RTTR_DLL") + local dir = package:installdir(package:config("shared") and "bin" or "lib") + os.vcp(path.join(package:buildir(), "bin/*.pdb"), dir) end end) @@ -87,5 +93,5 @@ package("rttr") assert(ctor.is_valid()); } } - ]]}, { configs = {languages = "c++14"} })) + ]]}, { configs = {languages = "c++20"} })) end)