Parcourir la source

matplotplusplus: support mingw (#8255)

* matplotplusplus: fix deps, support mingw

* matplotplusplus: rollback deps

* Update xmake.lua

* add checkx

---------

Co-authored-by: HYX <[email protected]>
Co-authored-by: Saikari <[email protected]>
Co-authored-by: star9029 <[email protected]>
HuiYuanXin13 il y a 2 mois
Parent
commit
2cdb7ef4c2
1 fichiers modifiés avec 7 ajouts et 2 suppressions
  1. 7 2
      packages/m/matplotplusplus/xmake.lua

+ 7 - 2
packages/m/matplotplusplus/xmake.lua

@@ -28,7 +28,7 @@ package("matplotplusplus")
     add_deps("cmake")
     add_deps("nodesoup", "cimg")
 
-    if is_plat("windows") then
+    if is_plat("windows", "mingw") then
         add_syslinks("user32", "shell32", "gdi32")
     end
 
@@ -40,6 +40,11 @@ package("matplotplusplus")
                 end
             end
         end)
+        on_check("mingw", function (package)
+            if package:version() and package:version():lt("1.2.0") then
+                assert(false, "package(matplotplusplus <1.2.0) unsupported version on mingw")
+            end
+        end)
     end
 
     on_load(function (package)
@@ -50,7 +55,7 @@ package("matplotplusplus")
         end
     end)
 
-    on_install("windows", "macosx", "linux", function (package)
+    on_install("windows", "mingw", "macosx", "linux", function (package)
         if package:is_plat("windows") then
             local vs = import("core.tool.toolchain").load("msvc"):config("vs")
             if tonumber(vs) < 2019 then