# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") ohos_source_set("tools_atm_source_set") { include_dirs = [ "include", "//base/security/access_token/frameworks/common/include", "${ability_runtime_path}/tools/aa/include", "//base/security/access_token/interfaces/innerkits/accesstoken/main/cpp/include", "//base/security/access_token/interfaces/innerkits/privacy/include", "${ability_runtime_services_path}/common/include", ] sources = [ "${ability_runtime_path}/tools/aa/src/shell_command.cpp", "src/atm_command.cpp", "src/atm_receiver_impl.cpp", "src/main.cpp", "src/to_string.cpp", ] deps = [ "${ability_runtime_path}/tools/aa:aa", "//base/security/access_token/interfaces/innerkits/accesstoken:libaccesstoken_sdk", "//base/security/access_token/interfaces/innerkits/privacy:libprivacy_sdk", ] cflags = [ "-DHILOG_ENABLE" ] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", ] if (is_asan) { external_deps += [ "bundle_framework:appexecfwk_core", "ipc:ipc_core", ] } else { include_dirs += [ "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include/bundlemgr", "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", ] } subsystem_name = "security" part_name = "access_token" } ohos_executable("atm") { deps = [ ":tools_atm_source_set" ] install_enable = true subsystem_name = "security" part_name = "access_token" }