improve workflow (#928)

* improve workflow

* Update xmake.lua
pull/929/head
ruki 3 years ago committed by GitHub
parent f7b4ff6c55
commit 6f77b6ec11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      packages/w/workflow/xmake.lua

@ -20,11 +20,20 @@ package("workflow")
end
end )
on_install("linux", "macosx", function (package)
on_install("linux", "macosx", "android", 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"))
if package:is_plat("android") then
io.replace("src/CMakeLists.txt", "add_subdirectory(client)", "add_subdirectory(client)\nlink_libraries(ssl crypto)", {plain = true})
end
import("package.tools.cmake").install(package, configs, {packagedeps = "openssl"})
if package:config("shared") then
os.tryrm(path.join(package:installdir("lib"), "*.a"))
else
os.tryrm(path.join(package:installdir("lib"), "*.so"))
os.tryrm(path.join(package:installdir("lib"), "*.dylib"))
end
end)
on_test(function (package)

Loading…
Cancel
Save