# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") config("pulse_config") { visibility = [ ":*" ] include_dirs = [ "../../../include", "../../../src/pulse", "../../../src", "../../../", "../../src", "../../include", ] cflags = [ "-Wall", "-Werror", "-Wno-implicit-function-declaration", "-Wno-sign-compare", "-Wno-unused-function", "-DHAVE_CONFIG_H", "-D_GNU_SOURCE", ] } config("pulse_include_config") { visibility = [ ":*" ] include_dirs = [ "../../../include", "../../../src", ] } ohos_source_set("pulse_sources") { sources = [ "../../../src/pulse/channelmap.c", "../../../src/pulse/context.c", "../../../src/pulse/direction.c", "../../../src/pulse/error.c", "../../../src/pulse/ext-device-manager.c", "../../../src/pulse/ext-device-restore.c", "../../../src/pulse/ext-stream-restore.c", "../../../src/pulse/format.c", "../../../src/pulse/internal.h", "../../../src/pulse/introspect.c", "../../../src/pulse/mainloop-api.c", "../../../src/pulse/mainloop-signal.c", "../../../src/pulse/mainloop.c", "../../../src/pulse/ohos_pa_volume.c", "../../../src/pulse/operation.c", "../../../src/pulse/proplist.c", "../../../src/pulse/rtclock.c", "../../../src/pulse/sample.c", "../../../src/pulse/scache.c", "../../../src/pulse/stream.c", "../../../src/pulse/subscribe.c", "../../../src/pulse/thread-mainloop.c", "../../../src/pulse/timeval.c", "../../../src/pulse/utf8.c", "../../../src/pulse/util.c", "../../../src/pulse/xmalloc.c", ] configs = [ ":pulse_config" ] external_deps = [ "hilog:libhilog" ] subsystem_name = "thirdparty" part_name = "pulseaudio" } ohos_shared_library("pulse") { branch_protector_ret = "pac_ret" deps = [ ":pulse_sources", "../../src:pulsecommon", ] public_configs = [ ":pulse_include_config" ] external_deps = [ "hilog:libhilog" ] defines = [] if (defined(global_parts_info) && defined(global_parts_info.hiviewdfx_hitrace)) { defines += [ "FEATURE_HITRACE_METER" ] external_deps += [ "hitrace:hitrace_meter" ] } subsystem_name = "thirdparty" innerapi_tags = [ "platformsdk_indirect" ] part_name = "pulseaudio" } ohos_shared_library("pulse-simple") { sources = [ "../../../src/pulse/simple.c" ] configs = [ ":pulse_config" ] deps = [ "../../src:pulsecommon", "../../src/pulse:pulse", ] subsystem_name = "thirdparty" part_name = "pulseaudio" }