improve raylib to support mac arm64 (#813)

* improve raylib to support mac arm64

* Update xmake.lua
pull/814/head
ruki 3 years ago committed by GitHub
parent f2cfd62f25
commit 38cf534b7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/r/raylib/xmake.lua

@ -3,7 +3,7 @@ package("raylib")
set_homepage("http://www.raylib.com")
set_description("A simple and easy-to-use library to enjoy videogames programming.")
if is_plat("macosx") then
if is_plat("macosx") and is_arch("x86_64") then
add_urls("https://github.com/raysan5/raylib/releases/download/$(version).tar.gz", {version = function (version)
if version:ge("3.5.0") then
return version .. "/raylib-" .. version .. "_macos"
@ -40,12 +40,12 @@ package("raylib")
end
add_deps("opengl", {optional = true})
on_install("macosx", function (package)
on_install("macosx|x86_64", function (package)
os.cp("include/raylib.h", package:installdir("include"))
os.cp("lib/libraylib.a", package:installdir("lib"))
end)
on_install("windows", "linux", function (package)
on_install("windows", "linux", "macosx|arm64", function (package)
local configs = {"-DBUILD_EXAMPLES=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))

Loading…
Cancel
Save