1# Copyright (c) 2020-2021 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/lite/config/component/lite_component.gni")
15import("//build/lite/ndk/ndk.gni")
16import("//foundation/arkui/ace_engine_lite/ace_lite.gni")
17
18declare_args() {
19  # player lite implement path, if not the null, vendor could
20  # implement player.
21  config_ohos_multimedia_media_lite_player_path = ""
22}
23
24if (config_ohos_multimedia_media_lite_player_path == "") {
25  lite_library("audio_lite_api") {
26    if (ohos_kernel_type == "liteos_m") {
27      target_type = "static_library"
28    } else {
29      target_type = "shared_library"
30    }
31
32    sources = [
33      "src/audio_module.cpp",
34      "src/audio_player.cpp",
35    ]
36
37    include_dirs = ace_lite_include_dirs
38    include_dirs += [
39      "//foundation/multimedia/media_lite/interfaces/kits/player_lite/js/builtin/include",
40      "//foundation/multimedia/media_lite/interfaces/kits/player_lite",
41      "//foundation/multimedia/media_utils_lite/interfaces/kits",
42    ]
43
44    public_deps = [
45      "//foundation/multimedia/media_lite/frameworks/player_lite",
46      "//foundation/multimedia/media_utils_lite:media_common",
47    ]
48
49    if (ohos_kernel_type == "liteos_m") {
50      public_deps += [ "//third_party/bounds_checking_function:libsec_static" ]
51    } else {
52      public_deps += [ "//third_party/bounds_checking_function:libsec_shared" ]
53    }
54  }
55} else {
56  static_library("audio_lite_api") {
57    public_deps = [ config_ohos_multimedia_media_lite_player_path ]
58  }
59}
60