浏览代码

limit plat

star9029 1 年之前
父节点
当前提交
f185a94df6
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      packages/b/bmf/xmake.lua

+ 10 - 1
packages/b/bmf/xmake.lua

@@ -23,6 +23,15 @@ package("bmf")
     elseif is_plat("linux", "bsd") then
     elseif is_plat("linux", "bsd") then
         add_syslinks("pthread", "dl")
         add_syslinks("pthread", "dl")
     end
     end
+    
+    on_check("windows", function (package)
+        local vs_toolset = package:toolchain("msvc"):config("vs_toolset")
+        if vs_toolset then
+            local vs_toolset_ver = import("core.base.semver").new(vs_toolset)
+            local minor = vs_toolset_ver:minor()
+            assert(minor and minor >= 30, "package(bmf): Only support >= v143 toolset")
+        end
+    end)
 
 
     on_load(function (package)
     on_load(function (package)
         if package:config("breakpad") then
         if package:config("breakpad") then
@@ -46,7 +55,7 @@ package("bmf")
         end
         end
     end)
     end)
 
 
-    on_install("windows", "linux", "macosx", function (package)
+    on_install("windows", "linux", function (package)
         local configs = {
         local configs = {
             "-DBMF_LOCAL_DEPENDENCIES=OFF",
             "-DBMF_LOCAL_DEPENDENCIES=OFF",
             "-DBMF_ENABLE_PYTHON=OFF",
             "-DBMF_ENABLE_PYTHON=OFF",