package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
1.1 KiB

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)