From 349e5e6dae81f958ab0172474ea9bd34755b3790 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 31 May 2021 22:58:13 +0800 Subject: [PATCH] improve curl --- packages/l/libcurl/xmake.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/l/libcurl/xmake.lua b/packages/l/libcurl/xmake.lua index 124cab8fc..5a482022f 100644 --- a/packages/l/libcurl/xmake.lua +++ b/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