• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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
16src_path = "${aafwk_lite_path}/frameworks/ability_lite/example/entry/src/main/cpp"
17
18lite_library("hiability") {
19    target_type = "shared_library"
20    ldflags = [
21        "-shared",
22    ]
23    sources = [
24        "${src_path}/root_view_helper.cpp",
25        "${src_path}/service_ability.cpp",
26    ]
27
28    if (enable_ohos_appexecfwk_feature_ability == true) {
29        sources += [
30            "${src_path}/main_ability.cpp",
31            "${src_path}/second_ability.cpp",
32            "${src_path}/main_ability_slice.cpp",
33            "${src_path}/next_ability_slice.cpp",
34            "${src_path}/second_ability_slice.cpp",
35        ]
36    }
37
38    include_dirs = [
39        ".",
40        "${aafwk_lite_path}/frameworks/ability_lite/example/entry/src/main/cpp",
41        "${aafwk_lite_path}/interfaces/innerkits/abilitymgr_lite",
42        "${aafwk_lite_path}/interfaces/kits/ability_lite",
43        "${aafwk_lite_path}/interfaces/kits/want_lite",
44        "${appexefwk_lite_path}/interfaces/kits/bundle_lite",
45        "${appexefwk_lite_path}/utils/bundle_lite",
46        "//foundation/communication/ipc_lite/interfaces/kits",
47        "//foundation/graphic/utils/interfaces/innerkits",
48        "//foundation/graphic/ui/interfaces/kits",
49        "//foundation/graphic/utils/interfaces/kits/gfx_utils",
50    ]
51
52    deps = [
53        "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
54    ]
55
56    defines = [
57        "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER",
58    ]
59
60    if (enable_ohos_appexecfwk_feature_ability == true) {
61        deps += [
62            "//foundation/graphic/ui:lite_ui",
63        ]
64        defines += [
65            "ENABLE_WINDOW=1",
66            "ABILITY_WINDOW_SUPPORT"
67        ]
68    }
69    output_dir = "$root_out_dir/dev_tools/example"
70}
71