add libsdl_gfx

pull/52/head
ruki 4 years ago
parent c868ca6b73
commit af94d136de
No known key found for this signature in database
GPG Key ID: 809EF06AD42725BD
  1. 1
      packages/l/libsdl/xmake.lua
  2. 26
      packages/l/libsdl_gfx/xmake.lua

@ -20,6 +20,7 @@ package("libsdl")
add_syslinks("gdi32", "user32", "winmm", "shell32")
end
add_links("SDL2main", "SDL2")
add_includedirs("include", "include/SDL2")
on_install("windows", "mingw", function (package)
local arch = package:arch()

@ -0,0 +1,26 @@
package("libsdl_gfx")
set_homepage("https://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/")
set_description("Simple DirectMedia Layer primitives drawing library")
set_urls("https://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-$(version).tar.gz")
add_versions("1.0.4", "63e0e01addedc9df2f85b93a248f06e8a04affa014a835c2ea34bfe34e576262")
add_deps("libsdl")
add_links("SDL2_gfx")
add_includedirs("include", "include/SDL2")
on_install("macosx", "linux", function (package)
local configs = {}
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")
else
table.insert(configs, "--enable-shared=no")
end
table.insert(configs, "--with-sdl-prefix=" .. package:dep("libsdl"):installdir())
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("pixelColor", {includes = "SDL2/SDL2_gfxPrimitives.h"}))
end)
Loading…
Cancel
Save