Skip to content

Commit

Permalink
Update xmake.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLynix authored Jan 23, 2024
1 parent d418576 commit 88b1ef3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/s/squirrel/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ package("squirrel")

add_deps("cmake")

on_install(function (package)
if package:is_plat("iphoneos") then
package:build_addenv("defines", "IOS")
end
on_install("windows", "mingw", "linux", "bsd", "macosx", "android", "iphoneos", "cross", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
if package:config("shared") then
Expand All @@ -24,7 +21,11 @@ package("squirrel")
table.insert(configs, "-DBUILD_SHARED_LIBS=OFF")
table.insert(configs, "-DDISABLE_STATIC=OFF")
end
import("package.tools.cmake").install(package, configs)
local opt
if package:is_plat("iphoneos") then
opt = {cxflags = "-DIOS"}
end
import("package.tools.cmake").install(package, configs, opt)
os.cp("include", package:installdir())
end)

Expand Down

0 comments on commit 88b1ef3

Please sign in to comment.