# Copyright (c) 2021-2023 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("../../../../os_account.gni") import("../../os_account_service.gni") config("accountmgr_config") { include_dirs = [ "${app_account_services_path}/include", "${app_account_services_path}/include/ability_manager_adapter", "${app_account_services_path}/include/appaccount", "${app_account_services_path}/include/osaccount", "${innerkits_path}/include", "${os_account_dfx_path}/hidumper_adapter", "${app_account_interfaces_native_path}/include", "${os_account_dfx_path}/hisysevent_adapter", "${os_account_dfx_path}/hitrace_adapter", "${app_account_innerkits_native_path}/include", ] } config("account_iam_config") { include_dirs = [ "${account_iam_interfaces_native_path}/include" ] } config("domain_account_config") { include_dirs = [ "${app_account_services_path}/include/domain_account", "${domain_account_framework_path}/include", "${domain_account_interfaces_native_path}/include", ] } config("ability_manager_config") { include_dirs = [ "${ability_runtime_path}/interfaces/inner_api/ability_manager/include", "${ability_runtime_path}/ability_base/interfaces/inner_api/want/include", "${ability_runtime_path}/services/abilitymgr/include", "${ability_runtime_path}/services/common/include", ] } config("accountmgr_public_config") { visibility = [ ":*" ] include_dirs = [ "${services_path}/accountmgr/include", "${services_path}/accountmgr/include/appaccount", "${services_path}/accountmgr/include/osaccount", "${services_path}/accountmgr/include/domain_account", ] if (has_user_auth_part) { include_dirs += [ "${services_path}/accountmgr/include/account_iam" ] } } config("bundle_manager_config") { include_dirs = [ "${services_path}/accountmgr/include/bundle_manager_adapter", "${bundle_framework_path}/common/log/include", "${bundle_framework_path}/interfaces/inner_api/appexecfwk_core/include", ] } config("mock_accountmgr_config") { cflags = [ "-pipe" ] cflags_cc = [ "-Wdate-time", "-Wformat=2", "-Wfloat-equal", "-Wshadow", ] if (os_account_multiple_active_accounts) { cflags += [ "-DENABLE_MULTIPLE_ACTIVE_ACCOUNTS" ] } if (os_account_support_deactivate_main_os_account) { cflags += [ "-DSUPPORT_STOP_MAIN_OS_ACCOUNT" ] } if (os_account_distributed_feature) { cflags += [ "-DDISTRIBUTED_FEATURE_ENABLED" ] } if (os_account_enable_multiple_os_accounts || use_clang_coverage) { cflags += [ "-DENABLE_MULTIPLE_OS_ACCOUNTS" ] } if (os_account_enable_default_admin_name) { cflags += [ "-DENABLE_DEFAULT_ADMIN_NAME" ] } if (os_account_enable_account_short_name) { cflags += [ "-DENABLE_ACCOUNT_SHORT_NAME" ] } configs = [ ":bundle_manager_config", ":domain_account_config", ":accountmgr_public_config", ] if (has_user_auth_part) { cflags_cc += [ "-DHAS_USER_AUTH_PART", "-DHAS_USER_IDM_PART", ] configs += [ ":account_iam_config" ] } if (has_kv_store_part) { cflags_cc += [ "-DHAS_APP_ACCOUNT_PART", "-DHAS_KV_STORE_PART", ] } if (has_storage_service_part) { cflags += [ "-DHAS_STORAGE_PART" ] } if (build_selinux) { cflags += [ "-DWITH_SELINUX" ] } if (has_ces_part) { cflags_cc += [ "-DHAS_CES_PART" ] } if (has_hiviewdfx_hisysevent_part) { cflags_cc += [ "-DHAS_HISYSEVENT_PART" ] } if (hicollie_enable == true) { cflags_cc += [ "-DHICOLLIE_ENABLE" ] } if (security_guard_enabled) { cflags_cc += [ "-DSECURITY_GUARDE_ENABLE" ] } if (has_hiviewdfx_hitrace_part) { cflags_cc += [ "-DHAS_HITRACE_PART" ] } }