• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("../../../../updateengine.gni")
16import("../session/update_session.gni")
17
18ohos_shared_library("$updateengine_client_library_name") {
19  sources = [
20    "$updateengine_root_path/frameworks/js/napi/update/common/src/client_helper.cpp",
21    "$updateengine_root_path/frameworks/js/napi/update/common/src/iupdater.cpp",
22    "$updateengine_root_path/frameworks/js/napi/update/src/define_property.cpp",
23    "$updateengine_root_path/frameworks/js/napi/update/src/local_updater.cpp",
24    "$updateengine_root_path/frameworks/js/napi/update/src/restorer.cpp",
25    "$updateengine_root_path/frameworks/js/napi/update/src/session_manager.cpp",
26    "$updateengine_root_path/frameworks/js/napi/update/src/update_client.cpp",
27    "$updateengine_root_path/frameworks/js/napi/update/src/update_module.cpp",
28    "$updateengine_root_path/frameworks/js/napi/update/src/update_session.cpp",
29  ]
30  sources += session_sources
31
32  include_dirs = [
33    "$updateengine_root_path/frameworks/js/napi/update/common/include",
34    "$updateengine_root_path/frameworks/js/napi/update/include",
35  ]
36  include_dirs += session_include_dirs
37
38  deps = [
39    "$updateengine_root_path/foundations:update_foundations",
40    "$updateengine_root_path/interfaces/inner_api/engine:$updateengine_inner_library_name",
41  ]
42
43  external_deps = [
44    "access_token:libaccesstoken_sdk",
45    "access_token:libtokenid_sdk",
46    "c_utils:utils",  # sptr
47    "hilog:libhilog",
48    "ipc:ipc_core",
49    "json:nlohmann_json_static",
50    "napi:ace_napi",
51  ]
52
53  install_enable = true
54  relative_install_dir = "module"
55  part_name = "$updateengine_part_name"
56  subsystem_name = "updater"
57
58  cflags = [
59    "-fPIC",
60    "-Os",
61    "-Werror",
62    "-DNAPI_VERSION=8",
63  ]
64}
65