Преглед изворни кода

improve and fix curl (#144)

* libcurl: Add winmm and wldap32 links

* Try without winmm link (wtf?)

* Revert to original file for testing

* libcurl: disable LDAP support on Windows

* libcurl: Add advapi32 and winmm dependencies

* Oops

* fix curl for mingw

Co-authored-by: Jérôme Leclercq <[email protected]>
ruki пре 4 година
родитељ
комит
0db6840323
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      packages/l/libcurl/xmake.lua

+ 3 - 2
packages/l/libcurl/xmake.lua

@@ -22,10 +22,10 @@ package("libcurl")
     elseif is_plat("linux") then
         add_syslinks("pthread")
     elseif is_plat("windows", "mingw") then
-        add_syslinks("ws2_32")
+        add_syslinks("advapi32", "winmm", "ws2_32")
     end
 
-    on_load("windows", function (package)
+    on_load("windows", "mingw@macosx,linux", function (package)
         if not package:config("shared") then
             package:add("defines", "CURL_STATICLIB")
         end
@@ -35,6 +35,7 @@ package("libcurl")
         local configs = {"-DBUILD_TESTING=OFF"}
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
+        table.insert(configs, "-DCURL_DISABLE_LDAP=ON")
         import("package.tools.cmake").install(package, configs)
     end)