1# Copyright (C) 2023-2023 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.
13import("//foundation/CastEngine/castengine_cast_framework/cast_engine.gni")
14
15config("cast_config") {
16  include_dirs = [
17    "include",
18    "${cast_engine_interfaces}/inner_api:cast_interfaces_config"
19  ]
20}
21
22ohos_shared_library("cast") {
23  sources = [
24    "src/napi_cast_session.cpp",
25    "src/napi_cast_session_listener.cpp",
26    "src/napi_cast_session_manager.cpp",
27    "src/napi_cast_session_manager_listener.cpp",
28    "src/napi_castengine_utils.cpp",
29    "src/native_module.cpp",
30    "src/napi_mirror_player.cpp",
31    "src/napi_stream_player.cpp",
32    "src/napi_stream_player_listener.cpp",
33    "src/napi_callback.cpp",
34    "src/napi_async_work.cpp",
35    "src/napi_castengine_enum.cpp"
36  ]
37
38  configs = [
39    ":cast_config",
40    "${cast_engine_root}:cast_engine_default_config"
41  ]
42
43  deps = [
44    "${cast_engine_common}:cast_engine_common_sources",
45    "${cast_engine_interfaces}/inner_api:cast_engine_client",
46  ]
47
48  external_deps = [
49    "hilog:libhilog",
50    "ipc:ipc_core",
51    "napi:ace_napi",
52    "image_framework:image",
53    "image_framework:image_native",
54  ]
55
56  relative_install_dir = "module"
57  subsystem_name = "castplus"
58  part_name = "cast_engine"
59  sanitize = {
60      cfi = true
61      cfi_cross_dso = true
62      debug = false
63  }
64  branch_protector_ret = "pac_ret"
65}
66