lerc: add package (#2777)

pull/2782/head
star9029 1 year ago committed by GitHub
parent 56adc01c45
commit f099d1180d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      packages/l/lerc/xmake.lua

@ -0,0 +1,29 @@
package("lerc")
set_homepage("https://github.com/esri/lerc")
set_description("Limited Error Raster Compression")
set_license("Apache-2.0")
add_urls("https://github.com/Esri/lerc/archive/refs/tags/$(version).tar.gz",
"https://github.com/Esri/lerc.git")
add_versions("v4.0.0", "91431c2b16d0e3de6cbaea188603359f87caed08259a645fd5a3805784ee30a0")
add_deps("cmake")
on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
if package:config("shared") then
table.insert(configs, "-DBUILD_SHARED_LIBS=ON")
else
table.insert(configs, "-DBUILD_SHARED_LIBS=OFF")
if package:is_plat("windows", "mingw") then
package:add("defines", "LERC_STATIC")
end
end
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("lerc_computeCompressedSize", {includes = "Lerc_c_api.h"}))
end)
Loading…
Cancel
Save