diff --git a/packages/d/diasdk/xmake.lua b/packages/d/diasdk/xmake.lua new file mode 100644 index 00000000000..091c8e780b7 --- /dev/null +++ b/packages/d/diasdk/xmake.lua @@ -0,0 +1,20 @@ +package("diasdk") + set_homepage("https://visualstudio.microsoft.com/") + set_description("The Microsoft Debug Interface Access (DIA) SDK provides access to debug information stored in program database (.pdb) files generated by Microsoft postcompiler tools.") + + on_fetch("windows|x64", "windows|arm", "windows|arm64", function (package, opt) + if opt.system then + import("detect.sdks.find_dia_sdk") + + local dia_sdk = find_dia_sdk(nil, {arch = package:arch()}) + if dia_sdk then + return { + includedirs = dia_sdk.includedirs, + linkdirs = dia_sdk.linkdirs, + links = { + package:config("shared") and "msdia140" or "diaguids" + } + } + end + end + end)