Browse Source

remove `*_static` option for `gdal` (#4320)

zjyhjqs 1 year ago
parent
commit
e3ea284a14
1 changed files with 3 additions and 9 deletions
  1. 3 9
      packages/g/gdal/xmake.lua

+ 3 - 9
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