From 6062f2e1b49593b7c1d7fe4e87ce642264b653cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Wed, 3 Apr 2024 16:21:51 +0200 Subject: [PATCH] Update xmake.lua --- packages/c/chipmunk2d/xmake.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/c/chipmunk2d/xmake.lua b/packages/c/chipmunk2d/xmake.lua index cc9097ff2..1c1403bf2 100644 --- a/packages/c/chipmunk2d/xmake.lua +++ b/packages/c/chipmunk2d/xmake.lua @@ -37,7 +37,6 @@ package("chipmunk2d") end) on_install("windows", "linux", "macosx", "iphoneos", "mingw", "android", "wasm", function (package) - import("core.tool.compiler") local configs = {"-DBUILD_DEMOS=OFF"} table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) if package:config("shared") then @@ -51,9 +50,9 @@ package("chipmunk2d") end local opt = {} 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 - opt.cxflags = compiler.map_flags("c", "define", "CP_USE_DOUBLES=0", {target = self}) + opt.cxflags = "-DCP_USE_DOUBLES=0" end import("package.tools.cmake").install(package, configs, opt) os.vcp("include/chipmunk", package:installdir("include"))