1600cc4afSopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
2600cc4afSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3600cc4afSopenharmony_ci# you may not use this file except in compliance with the License.
4600cc4afSopenharmony_ci# You may obtain a copy of the License at
5600cc4afSopenharmony_ci#
6600cc4afSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7600cc4afSopenharmony_ci#
8600cc4afSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9600cc4afSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10600cc4afSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11600cc4afSopenharmony_ci# See the License for the specific language governing permissions and
12600cc4afSopenharmony_ci# limitations under the License.
13600cc4afSopenharmony_ci
14600cc4afSopenharmony_ciimport("//build/ohos.gni")
15600cc4afSopenharmony_ciimport("../../../../appexecfwk.gni")
16600cc4afSopenharmony_ci
17600cc4afSopenharmony_ciohos_shared_library("installer") {
18600cc4afSopenharmony_ci  include_dirs = [
19600cc4afSopenharmony_ci    "${kits_path}/js/bundlemgr",
20600cc4afSopenharmony_ci    "${kits_path}/js/common",
21600cc4afSopenharmony_ci  ]
22600cc4afSopenharmony_ci
23600cc4afSopenharmony_ci  defines = [
24600cc4afSopenharmony_ci    "APP_LOG_TAG = \"BMS\"",
25600cc4afSopenharmony_ci    "LOG_DOMAIN = 0xD001120",
26600cc4afSopenharmony_ci  ]
27600cc4afSopenharmony_ci
28600cc4afSopenharmony_ci  cflags = [ "-Os" ]
29600cc4afSopenharmony_ci  cflags_cc = [ "-Os" ]
30600cc4afSopenharmony_ci
31600cc4afSopenharmony_ci  deps = [
32600cc4afSopenharmony_ci    "${base_path}:appexecfwk_base",
33600cc4afSopenharmony_ci    "${common_path}:libappexecfwk_common",
34600cc4afSopenharmony_ci    "${core_path}:appexecfwk_core",
35600cc4afSopenharmony_ci    "${kits_path}/js/common:bundle_napi_common",
36600cc4afSopenharmony_ci  ]
37600cc4afSopenharmony_ci
38600cc4afSopenharmony_ci  external_deps = [
39600cc4afSopenharmony_ci    "c_utils:utils",
40600cc4afSopenharmony_ci    "hilog:libhilog",
41600cc4afSopenharmony_ci    "ipc:ipc_core",
42600cc4afSopenharmony_ci    "napi:ace_napi",
43600cc4afSopenharmony_ci  ]
44600cc4afSopenharmony_ci
45600cc4afSopenharmony_ci  sources = [
46600cc4afSopenharmony_ci    "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp",
47600cc4afSopenharmony_ci    "${kits_path}/js/bundlemgr/installer_callback.cpp",
48600cc4afSopenharmony_ci    "installer.cpp",
49600cc4afSopenharmony_ci    "native_module.cpp",
50600cc4afSopenharmony_ci  ]
51600cc4afSopenharmony_ci  external_deps += [
52600cc4afSopenharmony_ci    "ability_base:want",
53600cc4afSopenharmony_ci    "c_utils:utils",
54600cc4afSopenharmony_ci    "hilog:libhilog",
55600cc4afSopenharmony_ci    "ipc:ipc_single",
56600cc4afSopenharmony_ci  ]
57600cc4afSopenharmony_ci  public_external_deps = [ "libuv:uv" ]
58600cc4afSopenharmony_ci  relative_install_dir = "module/bundle"
59600cc4afSopenharmony_ci  subsystem_name = "bundlemanager"
60600cc4afSopenharmony_ci  part_name = "bundle_framework"
61600cc4afSopenharmony_ci}
62