• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/ohos.gni")
15import("//foundation/aafwk/standard/aafwk.gni")
16import("//foundation/ace/ace_engine/ace_config.gni")
17import(
18    "//foundation/ace/ace_engine/adapter/ohos/services/uiservice/uiservicems.gni")
19
20ohos_prebuilt_etc("ui_service.cfg") {
21  relative_install_dir = "init"
22  source = "ui_service.cfg"
23  part_name = ace_engine_part
24  subsystem_name = "ace"
25}
26
27group("uiservice_target") {
28  deps = [ ":uiservice" ]
29}
30
31group("unittest") {
32  testonly = true
33
34  deps = [ "test:unittest" ]
35}
36
37config("uiservicems_config") {
38  include_dirs = [
39    "include/",
40    "${innerkits_path}/base/include",
41    "${services_path}/common/include",
42    "//utils/native/base/include",
43    "//utils/system/safwk/native/include",
44    "//prebuilts/jdk/jdk8/linux-x86/include",
45    "//prebuilts/jdk/jdk8/linux-x86/include/linux",
46    "//third_party/json/include",
47    "//foundation/ace/ace_engine/interfaces/innerkits/ui_service_manager/include",
48    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base/include",
49    "${innerkits_path}/want/include",
50    "//foundation/windowmanager/interfaces/innerkits",
51    "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include",
52    "//third_party/icu/icu4c/source/common",
53    "//third_party/icu/icu4c/source/i18n",
54    "//third_party/icu/icu4c/source/ohos",
55    "//third_party/icu/icu4c/source",
56    "//base/global/i18n_standard/frameworks/intl/include",
57  ]
58  cflags = []
59  if (target_cpu == "arm") {
60    cflags += [ "-DBINDER_IPC_32BIT" ]
61  }
62}
63
64template("uiservice_static") {
65  forward_variables_from(invoker, "*")
66
67  ohos_source_set(target_name) {
68    defines += invoker.defines
69    cflags_cc += invoker.cflags_cc
70
71    sources = uiservice_files
72    configs = [
73      ":uiservicems_config",
74      "$ace_root:ace_config",
75      "$ace_flutter_engine_root:flutter_config",
76    ]
77
78    deps = [
79      "${innerkits_path}/want:want",
80      "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native",
81      "//foundation/aafwk/standard/interfaces/innerkits/base:base",
82      "//foundation/ace/ace_engine/interfaces/innerkits/ui_service_manager:ui_service_mgr",
83      "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base:appexecfwk_base",
84      "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core:appexecfwk_core",
85      "//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler:libeventhandler",
86      "//foundation/distributedschedule/dmsfwk/interfaces/innerkits/uri:zuri",
87      "//foundation/distributedschedule/safwk/interfaces/innerkits/safwk:system_ability_fwk",
88      "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
89      "//foundation/graphic/standard/rosen/modules/render_service_client:librender_service_client",
90      "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client",
91      "//foundation/multimodalinput/input/frameworks/proxy:libmmi-common",
92      "//foundation/windowmanager/wm:libwm",
93      "//third_party/icu/icu4c:shared_icui18n",
94      "//third_party/icu/icu4c:shared_icuuc",
95      "//utils/native/base:utils",
96    ]
97
98    deps += [ "//foundation/ace/ace_engine/adapter/ohos/services/uiservice/dialog_ui/dialog_picker/js:dialog_picker_js_files_etc" ]
99
100    deps += [ "$ace_root/build:libace" ]
101
102    external_deps = [
103      "ability_runtime:ability_manager",
104      "ability_runtime:runtime",
105      "hiviewdfx_hilog_native:libhilog",
106      "ipc:ipc_core",
107    ]
108  }
109}
110
111foreach(item, ace_platforms) {
112  platform = item.name
113  if (platform == "ohos") {
114    # generate uiservice_static lib
115    uiservice_static("uiservice_static_" + item.name) {
116      defines = []
117      config = {
118      }
119
120      if (defined(item.config)) {
121        config = item.config
122      }
123
124      if (defined(config.defines)) {
125        defines = config.defines
126      }
127
128      if (defined(config.cflags_cc)) {
129        cflags_cc = config.cflags_cc
130      }
131    }
132  }
133}
134
135ohos_shared_library("uiservice") {
136  deps = [ ":uiservice_static_ohos" ]
137  part_name = ace_engine_part
138  subsystem_name = "ace"
139}
140