BUILD.gn 2.5 KB
Newer Older
M
mamingshuai 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
# Copyright (c) 2020 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/lite/config/component/lite_component.gni")
import("//build/lite/config/subsystem/aafwk/config.gni")

lite_component("appspawn_lite") {
  features = [ ":appspawn" ]
}

# feature: appspawn
executable("appspawn") {
  sources = [
    "src/appspawn_adapter.c",
    "src/appspawn_message.c",
    "src/appspawn_process.c",
    "src/appspawn_service.c",
    "src/main.c",
  ]

  ldflags = [
    "-lstdc++",
    "-ldl",
  ]

  cflags = [
    "-Wall",
    "-Wno-format",
    "-Wno-format-extra-args",
  ]

  include_dirs = [
    "include",
C
chen_jie 已提交
43
    "//commonlibrary/utils_lite/include",
C
chen 已提交
44 45
    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
Z
zero-cyc 已提交
46
    "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
M
mamingshuai 已提交
47 48 49 50 51 52 53
    "//third_party/bounds_checking_function/include/",
    "//third_party/cJSON",
  ]

  deps = [
    "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
    "//build/lite/config/component/cJSON:cjson_shared",
54
    "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single",
55
    "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store",
C
chen 已提交
56
    "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
M
mamingshuai 已提交
57 58 59 60 61
    "//third_party/bounds_checking_function:libsec_shared",
  ]

  if (enable_ohos_appexecfwk_feature_ability == true) {
    deps += [
62
      "//foundation/arkui/ace_engine_lite/frameworks:ace_lite",
63 64 65
      "//foundation/graphic/surface:surface_lite",
      "//foundation/graphic/ui:ui_lite",
      "//foundation/graphic/utils:graphic_utils_lite",
M
mamingshuai 已提交
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
    ]
  }

  if (ohos_kernel_type == "liteos_a") {
    deps += [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
  }

  if (ohos_kernel_type == "linux") {
    include_dirs += []
  }
}

if (ohos_build_type == "debug") {
  group("unittest") {
    deps = [
      "//base/startup/appspawn_lite/services/test/unittest/common:unittest",
    ]
  }
}