From 0c32b3344fcb734f09956213d5f854a40212ffcc Mon Sep 17 00:00:00 2001 From: zhongning5 Date: Fri, 1 Nov 2024 15:04:23 +0800 Subject: [PATCH] build for liburing Signed-off-by: zhongning5 --- BUILD.gn | 34 +++++++++++++++++++++++++++++++++- bundle.json | 5 ++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 1b009a3..7832b35 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -50,7 +50,7 @@ action("liburing_configure") { } ohos_shared_library("liburing") { - configs = [ "//third_party/liburing:liburing_config" ] + public_configs = [ ":liburing_config" ] sources = [] foreach(src, liburing_source) { sources += [ "$code_dir/" + src ] @@ -62,4 +62,36 @@ ohos_shared_library("liburing") { innerapi_tags = [ "platformsdk" ] output_name = "liburing" output_extension = "so" + install_images = [ "system" ] +} + +## build for liburing test ## +ohos_executable("liburing_example_io_uring") { + sources = [ "examples/io_uring-test.c" ] + configs = [ ":liburing_config" ] + deps = [ ":liburing" ] + + install_enable = true + subsystem_name = "thirdparty" + part_name = "liburing" +} + +ohos_executable("liburing_example_io_uring_close") { + sources = [ + "examples/io_uring-close-test.c", + ] + include_dirs = [ "test" ] + configs = [ ":liburing_config" ] + deps = [ ":liburing" ] + + install_enable = true + subsystem_name = "thirdparty" + part_name = "liburing" +} + +group("uring_test") { + deps = [ + ":liburing_example_io_uring", + ":liburing_example_io_uring_close", + ] } diff --git a/bundle.json b/bundle.json index 3b1668e..d2090c9 100644 --- a/bundle.json +++ b/bundle.json @@ -28,7 +28,10 @@ "third_party": [] }, "build": { - "sub_component": [], + "sub_component": [ + "//third_party/liburing:liburing", + "//third_party/liburing:uring_test" + ], "inner_kits": [ { "name": "//third_party/liburing:liburing", -- Gitee