Update xmake.lua

SirLynix-patch-6
Jérôme Leclercq 8 months ago committed by GitHub
parent 28caec2cc8
commit 6062f2e1b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/c/chipmunk2d/xmake.lua

@ -37,7 +37,6 @@ package("chipmunk2d")
end) end)
on_install("windows", "linux", "macosx", "iphoneos", "mingw", "android", "wasm", function (package) on_install("windows", "linux", "macosx", "iphoneos", "mingw", "android", "wasm", function (package)
import("core.tool.compiler")
local configs = {"-DBUILD_DEMOS=OFF"} local configs = {"-DBUILD_DEMOS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
if package:config("shared") then if package:config("shared") then
@ -51,9 +50,9 @@ package("chipmunk2d")
end end
local opt = {} local opt = {}
if package:config("precision") == "double" then if package:config("precision") == "double" then
opt.cxflags = compiler.map_flags("c", "define", "CP_USE_DOUBLES=1", {target = self}) opt.cxflags = "-DCP_USE_DOUBLES=1"
elseif package:config("precision") == "single" then elseif package:config("precision") == "single" then
opt.cxflags = compiler.map_flags("c", "define", "CP_USE_DOUBLES=0", {target = self}) opt.cxflags = "-DCP_USE_DOUBLES=0"
end end
import("package.tools.cmake").install(package, configs, opt) import("package.tools.cmake").install(package, configs, opt)
os.vcp("include/chipmunk", package:installdir("include")) os.vcp("include/chipmunk", package:installdir("include"))

Loading…
Cancel
Save