improve curl

pull/444/head
ruki 4 years ago
parent 3209d68877
commit 349e5e6dae
No known key found for this signature in database
GPG Key ID: 809EF06AD42725BD
  1. 9
      packages/l/libcurl/xmake.lua

@ -55,13 +55,12 @@ package("libcurl")
table.insert(configs, "-DCURL_STATIC_CRT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
for name, enabled in pairs(package:configs()) do
if not package:extraconf("configs", name, "builtin") then
if name == "zlib" then
if not enabled then
io.replace("CMakeLists.txt", "if(ZLIB_FOUND)", "if(OFF)", {palin = true}) -- disable zlib now
end
elseif name == "openssl" then
if name == "openssl" then
table.insert(configs, "-DCMAKE_USE_" .. name:upper() .. (enabled and "=ON" or "=OFF"))
else
if name == "zlib" and not enabled then
io.replace("CMakeLists.txt", "if(ZLIB_FOUND)", "if(OFF)", {palin = true}) -- disable zlib now
end
table.insert(configs, "-DCURL_" .. name:upper() .. (enabled and "=ON" or "=OFF"))
end
end

Loading…
Cancel
Save