# Copyright (c) 2021 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")

config("appmgr_test_service_config") {
  include_dirs = [
    "${ability_runtime_test_path}/mock/services_abilitymgr_test/appmgr_test_service/include/",
    "${ability_runtime_services_path}/abilitymgr/include",
    "${ability_runtime_innerkits_path}/ability_manager/include",
    "${bundlefwk_inner_api_path}/appexecfwk_core/include",
    "${ability_runtime_innerkits_path}/app_manager/include",
    "${ability_runtime_path}/interfaces/kits/native/ability/native",
    "${ability_runtime_services_path}/common/include",
  ]
}

ohos_source_set("appmgr_test_service") {
  include_dirs = [
    "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/system_ability_mock",
    "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include",
    "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/aakit/include",
    "//third_party/jsoncpp/include",
  ]

  sources = [ "src/appmgr_test_service.cpp" ]

  configs = [ ":appmgr_test_service_config" ]
  cflags = []
  if (target_cpu == "arm") {
    cflags += [ "-DBINDER_IPC_32BIT" ]
  }
  deps = [
    "${ability_runtime_innerkits_path}/app_manager:app_manager",
    "//third_party/jsoncpp:jsoncpp",
  ]

  if (ability_runtime_graphics) {
  }

  external_deps = [
    "ability_base:want",
    "bundle_framework:appexecfwk_core",
    "c_utils:utils",
    "common_event_service:cesfwk_innerkits",
    "eventhandler:libeventhandler",
    "hiviewdfx_hilog_native:libhilog",
    "ipc:ipc_core",
  ]

  subsystem_name = "ability"
  part_name = "ability_runtime"
}
