Fix build scripts

This commit is contained in:
Tindy X committed 2023-12-11 04:16:24 +08:00
1 parent 8485c2c778
commit a4a273d645
2 files changed
+16 -5

No files matched your search

+4 -4
View File
@@ -15,7 +15,7 @@ includes("xmake/curl-static.lua")
add_requires("libcron", {system = false})
add_requires("yaml-cpp-static", {system = false})
add_requires("quickjspp", {system = false})
if not is_plat("macosx") and has_config("static") then
if not is_plat("macosx") and get_config("static") == true then
add_requires("curl-static", {system = false})
else
add_requires("libcurl")
@@ -33,10 +33,10 @@ target("subconverter")
add_includedirs("src")
add_includedirs("include")
add_packages("pcre2", "rapidjson", "toml11", "libcron", "quickjspp")
if is_plat("macosx") then
add_packages("libcurl")
else
if not is_plat("macosx") and get_config("static") == true then
add_packages("curl-static")
else
add_packages("libcurl")
end
if has_config("static") then
add_packages("yaml-cpp-static")
+12 -1
View File
@@ -2,6 +2,17 @@ package("curl-static")
add_deps("cmake")
add_versions("8.5.0", "7161cb17c01dcff1dc5bf89a18437d9d729f1ecd")
set_urls("https://github.com/curl/curl.git")
if is_plat("macosx", "iphoneos") then
add_frameworks("Security", "CoreFoundation", "SystemConfiguration")
elseif is_plat("linux") then
add_deps("mbedtls")
add_syslinks("pthread")
elseif is_plat("windows", "mingw") then
add_deps("zlib")
add_syslinks("advapi32", "crypt32", "wldap32", "winmm", "ws2_32", "user32", "bcrypt")
end
on_install(function (package)
local configs = {}
table.insert(configs, "-DCURL_USE_LIBSSH2=OFF")
@@ -14,7 +25,7 @@ package("curl-static")
table.insert(configs, "-DHTTP_ONLY=ON")
table.insert(configs, "-DCURL_USE_LIBSSH2=OFF")
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"))
table.insert(configs, "-DBUILD_SHARED_LIBS=OFF")
import("package.tools.cmake").install(package, configs)
end)
package_end()