• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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/filemanagement/app_file_service/backup.gni")
16
17ohos_executable("backup_tool") {
18  include_dirs = []
19  deps = []
20  defines = []
21  sources = [ "src/main.cpp" ]
22
23  if (build_variant == "root") {
24    include_dirs += [ "include" ]
25
26    defines += [
27      "LOG_DOMAIN=0xD004304",
28      "LOG_TAG=\"BackupTool\"",
29    ]
30
31    deps += [
32      "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner",
33      "${path_backup}/utils/:backup_utils",
34      "${path_jsoncpp}:jsoncpp",
35    ]
36
37    sources += [
38      "src/tools_op.cpp",
39      "src/tools_op_backup.cpp",
40      "src/tools_op_check_sa.cpp",
41      "src/tools_op_help.cpp",
42      "src/tools_op_restore.cpp",
43      "src/tools_op_restore_async.cpp",
44    ]
45
46    external_deps = [
47      "c_utils:utils",
48      "hilog:libhilog",
49      "hitrace:hitrace_meter",
50      "ipc:ipc_core",
51    ]
52
53    defines += [ "BACKUP_TOOL_ENABLE=1" ]
54  }
55
56  use_exceptions = true
57  install_enable = true
58  part_name = "app_file_service"
59  subsystem_name = "filemanagement"
60}
61