|
@@ -23,12 +23,20 @@ package("libcurl")
|
|
add_syslinks("pthread")
|
|
add_syslinks("pthread")
|
|
end
|
|
end
|
|
|
|
|
|
|
|
+ on_load("windows", function (package)
|
|
|
|
+ if not package:config("shared") then
|
|
|
|
+ package:add("defines", "CURL_STATICLIB")
|
|
|
|
+ end
|
|
|
|
+ end)
|
|
|
|
+
|
|
on_install("windows", function (package)
|
|
on_install("windows", function (package)
|
|
local configs = {"-DBUILD_TESTING=OFF"}
|
|
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"))
|
|
import("package.tools.cmake").install(package, configs)
|
|
import("package.tools.cmake").install(package, configs)
|
|
end)
|
|
end)
|
|
|
|
|
|
- on_install("macosx", "linux", "iphoneos", function (package)
|
|
|
|
|
|
+ on_install("macosx", "linux", "iphoneos", "mingw@macosx,linux", "cross", function (package)
|
|
local configs = {"--disable-silent-rules", "--disable-dependency-tracking"}
|
|
local configs = {"--disable-silent-rules", "--disable-dependency-tracking"}
|
|
if package:debug() then
|
|
if package:debug() then
|
|
table.insert(configs, "--enable-debug")
|
|
table.insert(configs, "--enable-debug")
|