1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15 16pulseaudio_build_path = "//third_party/pulseaudio/ohosbuild" 17pulseaudio_dir = "//third_party/pulseaudio" 18 19config("daemon_config") { 20 visibility = [ ":*" ] 21 22 include_dirs = [ 23 "$pulseaudio_build_path/include", 24 "$pulseaudio_dir/include", 25 "$pulseaudio_dir/src/daemon", 26 "$pulseaudio_dir/src", 27 "$pulseaudio_dir", 28 ] 29 30 cflags = [ 31 "-Wall", 32 "-Werror", 33 "-Wno-unused-function", 34 "-DHAVE_CONFIG_H", 35 "-DHAVE_UNISTD_H", 36 ] 37} 38 39ohos_source_set("pulseaudio_sources") { 40 sources = [ 41 "$pulseaudio_dir/src/daemon/caps.c", 42 "$pulseaudio_dir/src/daemon/cmdline.c", 43 "$pulseaudio_dir/src/daemon/cpulimit.c", 44 "$pulseaudio_dir/src/daemon/ohos_daemon-conf.c", 45 "$pulseaudio_dir/src/daemon/ohos_pa_main.c", 46 ] 47 48 configs = [ ":daemon_config" ] 49 50 part_name = "multimedia_audio_framework" 51 subsystem_name = "multimedia" 52} 53 54ohos_shared_library("pulseaudio") { 55 ldflags = [ "-ffast-math" ] 56 deps = [ 57 ":pulseaudio_sources", 58 "$pulseaudio_build_path/src:pulsecommon", 59 "$pulseaudio_build_path/src/pulse:pulse", 60 "$pulseaudio_build_path/src/pulsecore:pulsecore", 61 ] 62 63 part_name = "multimedia_audio_framework" 64 subsystem_name = "multimedia" 65} 66