add libgeotiff (#1425)

pull/1415/head
Hoildkv 2 years ago committed by GitHub
parent e33511f5b6
commit 1865b61c40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      packages/l/libgeotiff/xmake.lua

@ -0,0 +1,24 @@
package("libgeotiff")
set_homepage("https://github.com/OSGeo/libgeotiff")
set_description("Libgeotiff is an open source library for reading and writing GeoTIFF information tags")
set_license("MIT")
add_urls("https://download.osgeo.org/geotiff/libgeotiff/libgeotiff-$(version).tar.gz")
add_versions("1.7.1", "05ab1347aaa471fc97347d8d4269ff0c00f30fa666d956baba37948ec87e55d6")
add_configs("utils", {description = "Choose if GeoTIFF utilities should be built", default = false, type = "boolean"})
add_deps("cmake", "libtiff")
add_deps("proj", {configs = {tiff = true}})
on_install("windows", "macosx", "linux", function (package)
local configs = {"-DHAVE_TIFFOPEN=1", "-DHAVE_TIFFMERGEFIELDINFO=1"}
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"))
table.insert(configs, "-DWITH_UTILITIES=" .. (package:config("utils") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("GTIFNew", {includes = "geotiff.h"}))
end)
Loading…
Cancel
Save