diff --git a/BUILD.gn b/BUILD.gn index aaf8586e6f35295873116499dbc0c65e184e3c19..23a8e720aaa9d2d8089d40c809c2ca65c8b020e8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -13,6 +13,23 @@ import("//build/ohos.gni") +config("alsa_lib_header") { + include_dirs = [ + "//third_party/alsa-lib/include", + "//third_party/alsa-lib/include/sound", + "//third_party/alsa-lib/include/uapi", + "//third_party/alsa-lib/src/pcm", + "//third_party/alsa-lib/src/ucm", + "//third_party/alsa-lib/src/mixer", + "//third_party/alsa-lib/src/seq", + "//third_party/alsa-lib/src/hwdep", + "//third_party/alsa-lib/src/rawmidi", + "//third_party/alsa-lib/src/control", + "//third_party/alsa-lib/src/timer", + "{target_gen_dir}/include/", + ] +} + config("alsa_lib_config") { cflags = [ "-Wno-sign-compare", @@ -170,6 +187,7 @@ ohos_shared_library("libasound") { # conf files "src/conf:alsa-lib-prebuilt-all", ] + public_configs = [ ":alsa_lib_header" ] output_extension = "so" install_images = [ chipset_base_dir ] install_enable = true diff --git a/bundle.json b/bundle.json index ef123afd51d5f1c06ff672ac1ce0402fb569ae93..1db6e75dbfa60307141aa974ec7a3b86ae844b52 100644 --- a/bundle.json +++ b/bundle.json @@ -28,7 +28,17 @@ }, "build": { "sub_component": [ "//third_party/alsa-lib:libasound" ], - "inner_kits": [], + "inner_kits": [ + { + "type": "so", + "name": "//third_party/alsa-lib:libasound", + "header": { + "header_base": "//third_party/alsa-lib", + "header_files": [ + ] + } + } + ], "test": [] } }