• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020 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.
13import("//build/lite/config/component/lite_component.gni")
14import("//build/lite/config/subsystem/aafwk/config.gni")
15
16lite_component("appspawn_lite") {
17  features = [ ":appspawn" ]
18}
19
20# feature: appspawn
21executable("appspawn") {
22  sources = [
23    "src/appspawn_adapter.c",
24    "src/appspawn_message.c",
25    "src/appspawn_process.c",
26    "src/appspawn_service.c",
27    "src/main.c",
28  ]
29
30  ldflags = [
31    "-lstdc++",
32    "-ldl",
33  ]
34
35  cflags = [
36    "-Wall",
37    "-Wno-format",
38    "-Wno-format-extra-args",
39  ]
40
41  include_dirs = [
42    "include",
43    "//commonlibrary/utils_lite/include",
44    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr",
45    "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry",
46    "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
47    "//third_party/bounds_checking_function/include/",
48    "//third_party/cJSON",
49  ]
50
51  deps = [
52    "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
53    "//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",
56    "//foundation/systemabilitymgr/samgr_lite/samgr:samgr",
57    "//third_party/bounds_checking_function:libsec_shared",
58  ]
59
60  if (enable_ohos_appexecfwk_feature_ability == true) {
61    deps += [
62      "//foundation/arkui/ace_engine_lite/frameworks:ace_lite",
63      "//foundation/graphic/surface:lite_surface",
64      "//foundation/graphic/ui:lite_ui",
65      "//foundation/graphic/utils:lite_graphic_utils",
66    ]
67  }
68
69  if (ohos_kernel_type == "liteos_a") {
70    deps += [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
71  }
72
73  if (ohos_kernel_type == "linux") {
74    include_dirs += []
75  }
76}
77
78if (ohos_build_type == "debug") {
79  group("unittest") {
80    deps = [
81      "//base/startup/appspawn_lite/services/test/unittest/common:unittest",
82    ]
83  }
84}
85