1# Copyright (c) 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("../../powermgr.gni")
15
16ohos_executable("power-shell") {
17  include_dirs = [
18    "include",
19    "${powermgr_inner_api}/native/include",
20  ]
21
22  sources = [
23    "src/main.cpp",
24    "src/power_shell_command.cpp",
25  ]
26
27  deps = [ "${powermgr_inner_api}:powermgr_client" ]
28
29  configs = [ "${powermgr_utils_path}:coverage_flags" ]
30
31  external_deps = [
32    "ability_runtime:tools_aa_source_set",
33    "c_utils:utils",
34    "hilog:libhilog",
35    "ipc:ipc_core",
36  ]
37
38  if (has_display_manager_part) {
39    external_deps += [ "display_manager:displaymgr" ]
40  }
41
42  if (build_variant == "user") {
43    defines = [ "POWER_SHELL_USER" ]
44  }
45
46  install_enable = true
47  subsystem_name = "powermgr"
48  part_name = "${powermgr_part_name}"
49}
50