From 85c9c7530d1a234eb3626d937827fc1829961d1b Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 25 Jul 2024 22:56:05 +0800 Subject: [PATCH] add mingw support for crashpad (#4751) --- packages/c/crashpad/xmake.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/c/crashpad/xmake.lua b/packages/c/crashpad/xmake.lua index 8a1652c62..180fcee32 100644 --- a/packages/c/crashpad/xmake.lua +++ b/packages/c/crashpad/xmake.lua @@ -8,16 +8,26 @@ package("crashpad") add_includedirs("include/crashpad", "include/crashpad/mini_chromium") add_links("crashpad_client", "crashpad_util", "mini_chromium") + if add_bindirs then + add_bindirs("bin") + end add_deps("cmake") add_deps("libcurl") - on_install("linux", "windows|x64", "windows|x86", function(package) + if is_plat("macosx") then + add_frameworks("CoreFoundation") + add_syslinks("bsm") + end + + on_install("linux", "windows|x64", "windows|x86", "macosx", function(package) local configs = {} table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) import("package.tools.cmake").install(package, configs, {packagedeps = "libcurl"}) - package:addenv("PATH", "bin") + if not package:get("bindirs") then + package:addenv("PATH", "bin") + end end) on_test(function(package)