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("innerbundlemanager") {
18600cc4afSopenharmony_ci  include_dirs = [ "${kits_path}/js/common" ]
19600cc4afSopenharmony_ci
20600cc4afSopenharmony_ci  defines = [
21600cc4afSopenharmony_ci    "APP_LOG_TAG = \"BMS\"",
22600cc4afSopenharmony_ci    "LOG_DOMAIN = 0xD001120",
23600cc4afSopenharmony_ci  ]
24600cc4afSopenharmony_ci
25600cc4afSopenharmony_ci  cflags = [ "-Os" ]
26600cc4afSopenharmony_ci  cflags_cc = [ "-Os" ]
27600cc4afSopenharmony_ci
28600cc4afSopenharmony_ci  sources = []
29600cc4afSopenharmony_ci
30600cc4afSopenharmony_ci  deps = [
31600cc4afSopenharmony_ci    "${base_path}:appexecfwk_base",
32600cc4afSopenharmony_ci    "${common_path}:libappexecfwk_common",
33600cc4afSopenharmony_ci    "${core_path}:appexecfwk_core",
34600cc4afSopenharmony_ci    "${kits_path}/js/common:bundle_napi_common",
35600cc4afSopenharmony_ci  ]
36600cc4afSopenharmony_ci
37600cc4afSopenharmony_ci  external_deps = [
38600cc4afSopenharmony_ci    "c_utils:utils",
39600cc4afSopenharmony_ci    "hilog:libhilog",
40600cc4afSopenharmony_ci    "napi:ace_napi",
41600cc4afSopenharmony_ci  ]
42600cc4afSopenharmony_ci  public_external_deps = [ "libuv:uv" ]
43600cc4afSopenharmony_ci  if (bundle_framework_launcher) {
44600cc4afSopenharmony_ci    defines += [ "BUNDLE_FRAMEWORK_LAUNCHER" ]
45600cc4afSopenharmony_ci    sources += [
46600cc4afSopenharmony_ci      "bundle_status_callback.cpp",
47600cc4afSopenharmony_ci      "js_launcher.cpp",
48600cc4afSopenharmony_ci      "js_launcher_mgr.cpp",
49600cc4afSopenharmony_ci    ]
50600cc4afSopenharmony_ci    external_deps += [
51600cc4afSopenharmony_ci      "ability_base:want",
52600cc4afSopenharmony_ci      "common_event_service:cesfwk_core",
53600cc4afSopenharmony_ci      "common_event_service:cesfwk_innerkits",
54600cc4afSopenharmony_ci      "ipc:ipc_core",
55600cc4afSopenharmony_ci    ]
56600cc4afSopenharmony_ci  } else {
57600cc4afSopenharmony_ci    sources += [ "js_launcher_unsupported.cpp" ]
58600cc4afSopenharmony_ci  }
59600cc4afSopenharmony_ci
60600cc4afSopenharmony_ci  relative_install_dir = "module/bundle"
61600cc4afSopenharmony_ci  subsystem_name = "bundlemanager"
62600cc4afSopenharmony_ci  part_name = "bundle_framework"
63600cc4afSopenharmony_ci}
64