Skip to content

Commit

Permalink
Update xmake.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Jan 29, 2025
1 parent 9168e46 commit b2cc410
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions packages/k/kuba-zip/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,16 @@ package("kuba-zip")

add_deps("cmake")

on_install("windows", "macosx", "linux", "mingw", function (package)
on_install("windows", "macosx", "linux", "mingw", "msys", function (package)
if package:is_plat("windows", "mingw") and package:config("shared") then
package:add("defines", "ZIP_SHARED")
end

io.replace("CMakeLists.txt", "-Werror", "", {plain = true})

local configs = {"-DCMAKE_DISABLE_TESTING=ON", "-DZIP_BUILD_DOCS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
if package:config("shared") then
table.insert(configs, "-DBUILD_SHARED_LIBS=ON")
if package:is_plat("windows", "mingw") then
package:add("defines", "ZIP_SHARED")
end
else
table.insert(configs, "-DBUILD_SHARED_LIBS=OFF")
end
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

Expand Down

0 comments on commit b2cc410

Please sign in to comment.