new: aws-c-common package (#1200)
* new: aws-c-common package Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com> * chore: apply review suggestions Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com> * fix(packages/a/aws-c-common): add cmake dep Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com> * new(packages/a/aws-c-common): on_test Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com> * chore(packages/a/aws-c-common): apply latest suggestion Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com> * Update xmake.lua Co-authored-by: ruki <waruqi@gmail.com>pull/1202/head
parent
7ef184c593
commit
e83650b16b
1 changed files with 29 additions and 0 deletions
@ -0,0 +1,29 @@ |
|||||||
|
package("aws-c-common") |
||||||
|
set_homepage("https://github.com/awslabs/aws-c-common") |
||||||
|
set_description("Core c99 package for AWS SDK for C") |
||||||
|
set_license("Apache-2.0") |
||||||
|
|
||||||
|
add_urls("https://github.com/awslabs/aws-c-common/archive/$(version).tar.gz", |
||||||
|
"https://github.com/awslabs/aws-c-common.git") |
||||||
|
add_versions("v0.6.9", "928a3e36f24d1ee46f9eec360ec5cebfe8b9b8994fe39d4fa74ff51aebb12717") |
||||||
|
|
||||||
|
if is_plat("linux") then |
||||||
|
add_deps("cmake") |
||||||
|
add_syslinks("dl", "m", "pthread", "rt") |
||||||
|
end |
||||||
|
|
||||||
|
on_install("linux", function (package) |
||||||
|
local configs = {} |
||||||
|
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, "-DPERFORM_HEADER_CHECK=ON") |
||||||
|
table.insert(configs, "-DENABLE_NET_TESTS=OFF") |
||||||
|
import("package.tools.cmake").install(package, configs) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:has_cfuncs("aws_common_library_init", {includes = "aws/common/common.h"})) |
||||||
|
assert(package:has_cfuncs("aws_common_library_clean_up", {includes = "aws/common/common.h"})) |
||||||
|
assert(package:has_cfuncs("aws_ring_buffer_init", {includes = "aws/common/ring_buffer.h"})) |
||||||
|
assert(package:has_cfuncs("aws_uuid_init", {includes = "aws/common/uuid.h"})) |
||||||
|
end) |
Loading…
Reference in new issue