浏览代码

switch is_host to is_plat

xq114 4 年之前
父节点
当前提交
b3642370f9
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      packages/g/glfw/xmake.lua

+ 5 - 3
packages/g/glfw/xmake.lua

@@ -11,11 +11,13 @@ package("glfw")
 
 
     add_deps("cmake")
     add_deps("cmake")
 
 
-    if is_host("macosx") then
+    if is_plat("macosx") then
         add_frameworks("Cocoa", "IOKit")
         add_frameworks("Cocoa", "IOKit")
-    elseif is_host("windows") then
+    elseif is_plat("windows") then
         add_syslinks("user32", "shell32", "gdi32")
         add_syslinks("user32", "shell32", "gdi32")
-    elseif is_host("linux") then
+    elseif is_plat("mingw") then
+        add_syslinks("gdi32")
+    elseif is_plat("linux") then
         -- TODO: add wayland support
         -- TODO: add wayland support
         add_deps("libx11", "libxrandr", "libxrender", "libxinerama", "libxcursor", "libxi", "libxext")
         add_deps("libx11", "libxrandr", "libxrender", "libxinerama", "libxcursor", "libxi", "libxext")
         add_syslinks("dl", "pthread")
         add_syslinks("dl", "pthread")