180922886Sopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd.
280922886Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
380922886Sopenharmony_ci# you may not use this file except in compliance with the License.
480922886Sopenharmony_ci# You may obtain a copy of the License at
580922886Sopenharmony_ci#
680922886Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
780922886Sopenharmony_ci#
880922886Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
980922886Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1080922886Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1180922886Sopenharmony_ci# See the License for the specific language governing permissions and
1280922886Sopenharmony_ci# limitations under the License.
1380922886Sopenharmony_ci
1480922886Sopenharmony_ciimport("//build/ohos.gni")
1580922886Sopenharmony_ciimport("../../../../castplus_cast_engine_part.gni")
1680922886Sopenharmony_ciimport("../../../../config.gni")
1780922886Sopenharmony_ci
1880922886Sopenharmony_ci###############################################################################
1980922886Sopenharmony_ci
2080922886Sopenharmony_cicommon_include_dirs = [
2180922886Sopenharmony_ci  "../",
2280922886Sopenharmony_ci  "../remote",
2380922886Sopenharmony_ci  "../../ipc/base",
2480922886Sopenharmony_ci  "../../ipc/proxy",
2580922886Sopenharmony_ci  "../../ipc/stub",
2680922886Sopenharmony_ci  "../../../../interfaces/inner_api/native/session/include",
2780922886Sopenharmony_ci  "//third_party/json/single_include",
2880922886Sopenharmony_ci  "$commontype_dir/include",
2980922886Sopenharmony_ci]
3080922886Sopenharmony_ci
3180922886Sopenharmony_cicommon_deps = [
3280922886Sopenharmony_ci  "./../../../../frameworks/native/session:avsession_client",
3380922886Sopenharmony_ci  "./../../../../utils:avsession_utils",
3480922886Sopenharmony_ci  "./../../../session:avsession_server",
3580922886Sopenharmony_ci  "//third_party/openssl:libcrypto_shared",
3680922886Sopenharmony_ci]
3780922886Sopenharmony_ci
3880922886Sopenharmony_cicommon_external_deps = [
3980922886Sopenharmony_ci  "ability_base:want",
4080922886Sopenharmony_ci  "ability_runtime:wantagent_innerkits",
4180922886Sopenharmony_ci  "audio_framework:audio_client",
4280922886Sopenharmony_ci  "c_utils:utils",
4380922886Sopenharmony_ci  "data_object:distributeddataobject_impl",
4480922886Sopenharmony_ci  "graphic_surface:surface",
4580922886Sopenharmony_ci  "hilog:libhilog",
4680922886Sopenharmony_ci  "input:libmmi-client",
4780922886Sopenharmony_ci  "ipc:ipc_single",
4880922886Sopenharmony_ci  "safwk:system_ability_fwk",
4980922886Sopenharmony_ci  "samgr:samgr_proxy",
5080922886Sopenharmony_ci  "window_manager:libdm",
5180922886Sopenharmony_ci  "window_manager:libwm",
5280922886Sopenharmony_ci]
5380922886Sopenharmony_ci
5480922886Sopenharmony_cicommon_cflags = []
5580922886Sopenharmony_ci
5680922886Sopenharmony_ciif (castplus_cast_engine_enable) {
5780922886Sopenharmony_ci  common_cflags += [ "-DCASTPLUS_CAST_ENGINE_ENABLE" ]
5880922886Sopenharmony_ci  common_deps += [ "../../../session:avsession_cast_item" ]
5980922886Sopenharmony_ci}
6080922886Sopenharmony_ci
6180922886Sopenharmony_ciif (multimedia_av_session_enable_trace_control) {
6280922886Sopenharmony_ci  common_cflags += [ "-DENBABLE_AVSESSION_TRACE_CONTROL" ]
6380922886Sopenharmony_ci  common_external_deps += [ "hitrace:hitrace_meter" ]
6480922886Sopenharmony_ci}
6580922886Sopenharmony_ci
6680922886Sopenharmony_ciif (multimedia_av_session_enable_sysevent_control) {
6780922886Sopenharmony_ci  common_cflags += [ "-DENABLE_AVSESSION_SYSEVENT_CONTROL" ]
6880922886Sopenharmony_ci  common_external_deps += [ "hisysevent:libhisysevent" ]
6980922886Sopenharmony_ci}
7080922886Sopenharmony_ci
7180922886Sopenharmony_ciohos_shared_library("remote_session_source") {
7280922886Sopenharmony_ci  install_enable = true
7380922886Sopenharmony_ci  include_dirs = common_include_dirs
7480922886Sopenharmony_ci  deps = common_deps
7580922886Sopenharmony_ci  cflags = common_cflags
7680922886Sopenharmony_ci  external_deps = common_external_deps
7780922886Sopenharmony_ci  sanitize = {
7880922886Sopenharmony_ci    cfi = true
7980922886Sopenharmony_ci    cfi_cross_dso = true
8080922886Sopenharmony_ci    debug = false
8180922886Sopenharmony_ci  }
8280922886Sopenharmony_ci  source_sources = [ "remote_session_source_impl.cpp" ]
8380922886Sopenharmony_ci
8480922886Sopenharmony_ci  syncers = [
8580922886Sopenharmony_ci    "remote_session_syncer_impl.cpp",
8680922886Sopenharmony_ci    "remote_session_capability_set.cpp",
8780922886Sopenharmony_ci    "json_utils.cpp",
8880922886Sopenharmony_ci  ]
8980922886Sopenharmony_ci
9080922886Sopenharmony_ci  sources = source_sources + syncers
9180922886Sopenharmony_ci
9280922886Sopenharmony_ci  subsystem_name = "multimedia"
9380922886Sopenharmony_ci  part_name = "av_session"
9480922886Sopenharmony_ci}
9580922886Sopenharmony_ci
9680922886Sopenharmony_ciohos_shared_library("remote_session_sink") {
9780922886Sopenharmony_ci  install_enable = true
9880922886Sopenharmony_ci  include_dirs = common_include_dirs
9980922886Sopenharmony_ci  deps = common_deps
10080922886Sopenharmony_ci  cflags = common_cflags
10180922886Sopenharmony_ci  external_deps = common_external_deps
10280922886Sopenharmony_ci  sanitize = {
10380922886Sopenharmony_ci    cfi = true
10480922886Sopenharmony_ci    cfi_cross_dso = true
10580922886Sopenharmony_ci    debug = false
10680922886Sopenharmony_ci  }
10780922886Sopenharmony_ci  sink_sources = [ "remote_session_sink_impl.cpp" ]
10880922886Sopenharmony_ci
10980922886Sopenharmony_ci  syncers = [
11080922886Sopenharmony_ci    "remote_session_syncer_impl.cpp",
11180922886Sopenharmony_ci    "remote_session_capability_set.cpp",
11280922886Sopenharmony_ci    "json_utils.cpp",
11380922886Sopenharmony_ci  ]
11480922886Sopenharmony_ci
11580922886Sopenharmony_ci  sources = sink_sources + syncers
11680922886Sopenharmony_ci
11780922886Sopenharmony_ci  subsystem_name = "multimedia"
11880922886Sopenharmony_ci  part_name = "av_session"
11980922886Sopenharmony_ci}
120