|
@@ -6,6 +6,7 @@ package("aws-c-io")
|
|
|
add_urls("https://github.com/awslabs/aws-c-io/archive/refs/tags/$(version).tar.gz",
|
|
|
"https://github.com/awslabs/aws-c-io.git")
|
|
|
|
|
|
+ add_versions("v0.14.19", "127aa30608084affbcc0b7b26982ab4d98404d1aa103b91693d0e76b564da21d")
|
|
|
add_versions("v0.14.18", "44e9dee181ed7d867d1cc2944f4b4669259b569fc56bdd6dd4c7c30440fc4bf8")
|
|
|
add_versions("v0.14.16", "bf78ab5dbeeaec2f55cb035e18c49ce8ba4e2ea7519e8b94e18ccd8851e39f4d")
|
|
|
add_versions("v0.14.14", "c62400e83232e6d7c04bacebf02d552f6699d90735d9b8b6ee5fae879735c458")
|
|
@@ -17,25 +18,32 @@ package("aws-c-io")
|
|
|
add_versions("v0.14.5", "2700bcde062f7de1c1cbfd236b9fdfc9b24b4aa6dc0fb09bb156e16e07ebd0b6")
|
|
|
add_versions("v0.13.32", "2a6b18c544d014ca4f55cb96002dbbc1e52a2120541c809fa974cb0838ea72cc")
|
|
|
|
|
|
- add_configs("asan", {description = "Enable Address Sanitize.", default = false, type = "boolean"})
|
|
|
+ if is_plat("wasm") then
|
|
|
+ add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
|
|
|
+ end
|
|
|
|
|
|
- if is_plat("windows") then
|
|
|
+ if is_plat("windows","mingw") then
|
|
|
add_syslinks("advapi32", "crypt32", "secur32", "ncrypt")
|
|
|
- elseif is_plat("linux", "bsd", "cross") then
|
|
|
+ elseif is_plat("linux", "bsd", "cross", "android") then
|
|
|
add_deps("s2n-tls")
|
|
|
- elseif is_plat("macosx") then
|
|
|
+ elseif is_plat("macosx", "iphoneos") then
|
|
|
add_frameworks("Security")
|
|
|
end
|
|
|
|
|
|
add_deps("cmake", "aws-c-common", "aws-c-cal")
|
|
|
|
|
|
- on_install("windows|x64", "windows|x86", "linux", "macosx", "bsd", "msys", "cross", function (package)
|
|
|
- local cmakedir = package:dep("aws-c-common"):installdir("lib", "cmake")
|
|
|
- if package:is_plat("windows") then
|
|
|
- cmakedir = cmakedir:gsub("\\", "/")
|
|
|
+ on_install("!wasm and (!mingw or mingw|!i386)", function (package)
|
|
|
+ if package:is_plat("windows") and package:config("shared") then
|
|
|
+ package:add("defines", "USE_WINDOWS_DLL_SEMANTICS", "AWS_IO_USE_IMPORT_EXPORT")
|
|
|
end
|
|
|
|
|
|
- local configs = {"-DBUILD_TESTING=OFF", "-DCMAKE_MODULE_PATH=" .. cmakedir}
|
|
|
+ local cmakedir = path.unix(package:dep("aws-c-common"):installdir("lib", "cmake"))
|
|
|
+
|
|
|
+ local configs = {
|
|
|
+ "-DBUILD_TESTING=OFF",
|
|
|
+ "-DCMAKE_POLICY_DEFAULT_CMP0057=NEW",
|
|
|
+ "-DCMAKE_MODULE_PATH=" .. cmakedir,
|
|
|
+ }
|
|
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
|
|
|
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
|
|
|
table.insert(configs, "-DENABLE_SANITIZERS=" .. (package:config("asan") and "ON" or "OFF"))
|
|
@@ -43,6 +51,11 @@ package("aws-c-io")
|
|
|
table.insert(configs, "-DAWS_STATIC_MSVC_RUNTIME_LIBRARY=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
|
|
|
end
|
|
|
import("package.tools.cmake").install(package, configs)
|
|
|
+
|
|
|
+ if package:is_plat("windows") and package:is_debug() then
|
|
|
+ local dir = package:installdir(package:config("shared") and "bin" or "lib")
|
|
|
+ os.vcp(path.join(package:buildir(), "*.pdb"), dir)
|
|
|
+ end
|
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|