From e3ea284a14edde138097773cc25aba04d742087b Mon Sep 17 00:00:00 2001 From: zjyhjqs <141055431+zjyhjqs@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:46:46 +0800 Subject: [PATCH] remove `*_static` option for `gdal` (#4320) --- packages/g/gdal/xmake.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/g/gdal/xmake.lua b/packages/g/gdal/xmake.lua index 586fe9641..9a08a920c 100644 --- a/packages/g/gdal/xmake.lua +++ b/packages/g/gdal/xmake.lua @@ -11,7 +11,6 @@ package("gdal") add_deps("cmake") add_configs("apps", {description = "Build GDAL applications.", default = false, type = "boolean"}) add_configs("curl", {description = "Use CURL.", default = false, type = "boolean"}) - add_configs("curl_static", {description = "Use static build of CURL.", default = false, type = "boolean"}) add_configs("geos", {description = "Use GEOS.", default = false, type = "boolean"}) add_configs("gif", {description = "Use GIF.", default = false, type = "boolean"}) add_configs("iconv", {description = "Use Iconv.", default = false, type = "boolean"}) @@ -31,7 +30,6 @@ package("gdal") local configdeps = { curl = "libcurl", - curl_static = "libcurl", geos = "geos", gif = "giflib", iconv = "libiconv", @@ -45,11 +43,7 @@ package("gdal") for name, dep in pairs(configdeps) do if package:config(name) then - if name:match('^(.*)_static$') then - package:add("deps", dep, {configs = {shared = false}}) - else - package:add("deps", dep) - end + package:add("deps", dep) end end end) @@ -65,11 +59,11 @@ package("gdal") table.insert(configs, "-DBUILD_APPS=" .. (package:config("apps") and "ON" or "OFF")) local packagedeps = {"proj"} - if package:config("curl") or package:config("curl_static") then + if package:config("curl") then table.insert(packagedeps, "libcurl") table.insert(configs, "-DGDAL_USE_CURL=ON") - if package:config("curl_static") then + if not package:dep("libcurl"):config("shared") then table.insert(configs, "-DCURL_USE_STATIC_LIBS=ON") end end