add windows support to workflow (#4252)

* add windows support to workflow

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

@ -3,20 +3,30 @@ package("workflow")
set_description("C++ Parallel Computing and Asynchronous Networking Framework")
set_license("Apache-2.0")
add_urls("https://github.com/sogou/workflow/archive/refs/tags/$(version).tar.gz",
"https://github.com/sogou/workflow.git")
add_versions("v0.10.6", "5701ef31518a7927e61b26cd6cc1d699cb43393bf1ffc77fa61e73e64d2dd28e")
add_versions("v0.10.7", "aa9806983f32174597549db4a129e2ee8a3d1f005923fcbb924906bc70c0e123")
add_versions("v0.10.8", "bb5654e8011822d4251a7a433cbe4c5ecfd2c65c8f997a8196685742d24bcaf0")
add_versions("v0.10.9", "10f695aeb5da87ae138e3bcd2fa10c18aac782b0da20f11b2fd0b7b091d06767")
add_versions("v0.11.1", "06968ed4e43f6676811b620d09eb5c32ac57252305e7e28def6efde8ef1ceb19")
add_versions("v0.11.2", "cc2d18ab2b292e2f0163ef67ef6976912e2a21c271396da0e2151ca8cd22abd3")
add_versions("v0.11.3", "af7adcdd8151f8e72247599a43c28aa849d61ed39e58058cfa80649d011575bc")
add_versions("v0.11.4", "844fd03db120141fa61600b26a4ef35716dc0e75d1e8c8018078eb385cf746a4")
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")
add_versions("v0.10.6", "5701ef31518a7927e61b26cd6cc1d699cb43393bf1ffc77fa61e73e64d2dd28e")
add_versions("v0.10.7", "aa9806983f32174597549db4a129e2ee8a3d1f005923fcbb924906bc70c0e123")
add_versions("v0.10.8", "bb5654e8011822d4251a7a433cbe4c5ecfd2c65c8f997a8196685742d24bcaf0")
add_versions("v0.10.9", "10f695aeb5da87ae138e3bcd2fa10c18aac782b0da20f11b2fd0b7b091d06767")
add_versions("v0.11.1", "06968ed4e43f6676811b620d09eb5c32ac57252305e7e28def6efde8ef1ceb19")
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