浏览代码

add pthread for expresscpp

ruki 5 年之前
父节点
当前提交
2e27fa7fff
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      packages/e/expresscpp/xmake.lua

+ 5 - 1
packages/e/expresscpp/xmake.lua

@@ -12,7 +12,11 @@ package("expresscpp")
     add_deps("nlohmann_json", "fmt", {configs = {cmake = true}})
     add_deps("nlohmann_json", "fmt", {configs = {cmake = true}})
     add_deps("boost", {configs = {system = true}})
     add_deps("boost", {configs = {system = true}})
 
 
-    on_install("linux", "macosx", "windows", function (package)
+    if is_plat("linux") then
+        add_syslinks("pthread")
+    end
+
+    on_install("linux", "macosx", function (package)
         local configs = {}
         local configs = {}
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))