• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
15import("//foundation/arkui/ace_engine/ace_config.gni")
16import(
17    "//foundation/arkui/ace_engine/adapter/ohos/services/uiservice/uiservicems.gni")
18
19ohos_prebuilt_etc("ui_service.cfg") {
20  relative_install_dir = "init"
21  source = "ui_service.cfg"
22  part_name = ace_engine_part
23  subsystem_name = ace_engine_subsystem
24}
25
26group("uiservice_target") {
27  deps = [ ":uiservice" ]
28}
29
30group("unittest") {
31  testonly = true
32
33  deps = [ "test:unittest" ]
34}
35
36config("uiservicems_config") {
37  include_dirs = [
38    "include/",
39    "//commonlibrary/c_utils/base/include",
40    "//utils/system/safwk/native/include",
41    "//prebuilts/jdk/jdk8/linux-x86/include",
42    "//prebuilts/jdk/jdk8/linux-x86/include/linux",
43    "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager/include",
44  ]
45  cflags = []
46  if (target_cpu == "arm") {
47    cflags += [ "-DBINDER_IPC_32BIT" ]
48  }
49}
50
51template("uiservice_static") {
52  forward_variables_from(invoker, "*")
53
54  ohos_source_set(target_name) {
55    subsystem_name = ace_engine_subsystem
56    part_name = ace_engine_part
57    defines += invoker.defines
58    cflags_cc += invoker.cflags_cc
59
60    sources = uiservice_files
61    configs = [
62      ":uiservicems_config",
63      "$ace_root:ace_config",
64    ]
65
66    deps = [ "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk:system_ability_fwk" ]
67
68    external_deps = [
69      "ability_base:want",
70      "c_utils:utils",
71      "eventhandler:libeventhandler",
72      "hiviewdfx_hilog_native:libhilog",
73      "ipc:ipc_core",
74    ]
75  }
76}
77
78foreach(item, ace_platforms) {
79  platform = item.name
80  if (platform == "ohos") {
81    # generate uiservice_static lib
82    uiservice_static("uiservice_static_" + item.name) {
83      defines = []
84      config = {
85      }
86
87      if (defined(item.config)) {
88        config = item.config
89      }
90
91      if (defined(config.defines)) {
92        defines = config.defines
93      }
94
95      if (defined(config.cflags_cc)) {
96        cflags_cc = config.cflags_cc
97      }
98    }
99  }
100}
101
102ohos_shared_library("uiservice") {
103  deps = [ ":uiservice_static_ohos" ]
104  part_name = ace_engine_part
105  subsystem_name = ace_engine_subsystem
106}
107