# 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", "//third_party/glib/glib", "//third_party/glib", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", ] cflags = [ "-Wall", "-Werror", "-Wno-implicit-function-declaration", "-Wno-sign-compare", "-Wno-unused-function", "-DHAVE_CONFIG_H", "-D_GNU_SOURCE", ] } 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" ] subsystem_name = "thirdparty" part_name = "pulseaudio" } ohos_shared_library("pulse") { deps = [ ":pulse_sources", "../../src:pulsecommon", ] external_deps = [ "hilog:libhilog" ] 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" } ohos_shared_library("pulse-mainloop-glib") { sources = [ "../../../src/pulse/ohos_glib-mainloop.c" ] configs = [ ":pulse_config" ] deps = [ "../../src:pulsecommon", "//third_party/glib:glib", ] subsystem_name = "thirdparty" part_name = "pulseaudio" }