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 Jul 13, 2024
1 parent 343c3a4 commit fe79c39
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/g/glaze/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,26 @@ package("glaze")

add_deps("cmake")

on_install(function (package)
if on_check then
on_check("windows", function (package)
if package:is_plat("windows") then
local vs = package:toolchain("msvc"):config("vs")
assert(vs and tonumber(vs) >= 2022, "package(glaze): need vs >= 2022")
end
end)
end

on_install("windows", "linux", "bsd", "mingw", "wasm", function (package)
local version = package:version()
if version and version:ge("2.9.5") then
if package:has_tool("cxx", "cl", "clang_cl") then
package:add("cxxflags", "/Zc:preprocessor", "/permissive-", "/Zc:lambda")
end
import("package.tools.cmake").install(package, {"-Dglaze_DEVELOPER_MODE=OFF"})

import("package.tools.cmake").install(package, {
"-Dglaze_DEVELOPER_MODE=OFF",
"-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")
})
else
os.cp("include", package:installdir())
end
Expand Down

0 comments on commit fe79c39

Please sign in to comment.