• 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
14if (!is_linux && !is_mingw && !is_mac) {
15  import("//base/update/updater/updater_default_cfg.gni")
16}
17import("//build/ohos.gni")
18SUBSYSTEM_DIR = "//base/update/updater/services/diffpatch"
19
20config("diff_config") {
21  visibility = [ ":*" ]
22  include_dirs = [
23    "//base/update/updater/interfaces/kits/include/package",
24    "//base/update/updater/interfaces/kits/include",
25    "//base/update/updater/services/include/package",
26    "//base/update/updater/services/include/patch",
27    "//base/update/updater/services/include",
28    "//base/update/updater/utils/include",
29    "//base/update/updater/services/diffpatch/bzip2",
30    "//base/update/updater/services/diffpatch/diff",
31    "//base/update/updater/services/diffpatch",
32    "//third_party/bounds_checking_function/include",
33    "//third_party/bzip2",
34    "//third_party/openssl/include",
35  ]
36}
37
38ohos_static_library("libdiff") {
39  sources = [
40    "$SUBSYSTEM_DIR/bzip2/bzip2_adapter.cpp",
41    "$SUBSYSTEM_DIR/diff/blocks_diff.cpp",
42    "$SUBSYSTEM_DIR/diff/image_diff.cpp",
43    "$SUBSYSTEM_DIR/diff/update_diff.cpp",
44    "$SUBSYSTEM_DIR/diffpatch.cpp",
45  ]
46
47  deps = [
48    "//third_party/bounds_checking_function:libsec_static",
49    "//third_party/bzip2:libbz2",
50  ]
51  configs = [ ":diff_config" ]
52
53  subsystem_name = "updater"
54  part_name = "updater"
55}
56