Make package cpr support MinGW@Windows (#1331)

* Make package cpr support MinGW

* cpr: use same package platforms as libcurl

* cpr: fix usage of 'is_plat()'

* cpr: only support mingw@windows
pull/1333/head
Shiwei Wang 2 years ago committed by GitHub
parent a83035af10
commit 4350a4ca9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/c/cpr/xmake.lua

@ -11,7 +11,10 @@ package("cpr")
add_versions("1.8.3", "0784d4c2dbb93a0d3009820b7858976424c56578ce23dcd89d06a1d0bf5fd8e2")
add_deps("cmake", "libcurl")
on_install("linux", "macosx", "windows", function (package)
if is_plat("mingw") then
add_syslinks("pthread")
end
on_install("linux", "macosx", "windows", "mingw@windows", function (package)
local configs = {"-DCPR_BUILD_TESTS=OFF", "-DCPR_ENABLE_SSL=ON", "-DCPR_FORCE_USE_SYSTEM_CURL=ON"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))

Loading…
Cancel
Save