add windows support to workflow (#4252)

* add windows support to workflow

* Update xmake.lua
pull/4253/head
xpxz 9 months ago committed by GitHub
parent dc367d6df1
commit 4e892899d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 17
      packages/w/workflow/xmake.lua

@ -3,6 +3,10 @@ package("workflow")
set_description("C++ Parallel Computing and Asynchronous Networking Framework")
set_license("Apache-2.0")
if is_plat("windows") then
add_urls("https://github.com/sogou/workflow/archive/refs/tags/$(version)-win.zip")
add_versions("v0.10.10", "6758b1d46c4beadfccc88d3e9492bb99cfad26e643c141749aec790907092417")
else
add_urls("https://github.com/sogou/workflow/archive/refs/tags/$(version).tar.gz",
"https://github.com/sogou/workflow.git")
@ -14,9 +18,15 @@ package("workflow")
add_versions("v0.11.2", "cc2d18ab2b292e2f0163ef67ef6976912e2a21c271396da0e2151ca8cd22abd3")
add_versions("v0.11.3", "af7adcdd8151f8e72247599a43c28aa849d61ed39e58058cfa80649d011575bc")
add_versions("v0.11.4", "844fd03db120141fa61600b26a4ef35716dc0e75d1e8c8018078eb385cf746a4")
end
add_deps("openssl")
if is_plat("windows") then
add_deps("cmake")
add_syslinks("Mswsock")
end
if is_plat("linux") then
add_syslinks("pthread", "dl")
end
@ -29,6 +39,13 @@ package("workflow")
import("package.tools.xmake").install(package, configs)
end)
on_install("windows", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package: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)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <stdio.h>

Loading…
Cancel
Save