mirror of
https://github.com/openharmony/ability_ability_lite.git
synced 2026-07-01 18:25:51 -04:00
2c8f534901
Signed-off-by: unknown <hanlu1@huawei.com>
190 lines
6.1 KiB
Plaintext
190 lines
6.1 KiB
Plaintext
# 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")
|
|
import("//build/lite/config/test.gni")
|
|
import("//build/lite/ndk/ndk.gni")
|
|
import("//foundation/ability/ability_lite/ability_lite.gni")
|
|
|
|
generate_notice_file("ability_notice_file") {
|
|
module_name = "ability"
|
|
module_source_dir_list = [
|
|
"//third_party/bounds_checking_function",
|
|
"//third_party/cJSON",
|
|
]
|
|
}
|
|
|
|
config("ability_config") {
|
|
include_dirs = [
|
|
"${aafwk_lite_path}/interfaces/kits/ability_lite/slite",
|
|
"${aafwk_lite_path}/interfaces/kits/want_lite",
|
|
"${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
|
|
]
|
|
}
|
|
|
|
lite_library("ability") {
|
|
if (ohos_kernel_type == "liteos_m") {
|
|
target_type = "static_library"
|
|
|
|
sources = [
|
|
"src/slite/ability_saved_data.cpp",
|
|
"src/slite/lite_context.cpp",
|
|
"src/slite/slite_ability.cpp",
|
|
]
|
|
|
|
public_configs = [ ":ability_config" ]
|
|
|
|
public_deps = [
|
|
"${aafwk_lite_path}/frameworks/abilitymgr_lite:abilitymanager",
|
|
"${hilog_lite_path}/frameworks/featured:hilog_static",
|
|
"${kv_store_path}/interfaces/inner_api/kv_store:kv_store",
|
|
]
|
|
|
|
defines = []
|
|
|
|
include_dirs = [
|
|
"${aafwk_lite_path}/frameworks/abilitymgr_lite/include/slite",
|
|
"${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
|
|
"${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite/slite",
|
|
"${aafwk_lite_path}/interfaces/kits/ability_lite",
|
|
"${appexecfwk_lite_path}/utils/bundle_lite",
|
|
"${utils_lite_path}/memory/include",
|
|
"${ability_lite_samgr_lite_path}/interfaces/kits/registry",
|
|
"${ability_lite_samgr_lite_path}/interfaces/kits/samgr",
|
|
]
|
|
} else {
|
|
target_type = "shared_library"
|
|
|
|
sources = [
|
|
"src/ability.cpp",
|
|
"src/ability_context.cpp",
|
|
"src/ability_env.cpp",
|
|
"src/ability_env_impl.cpp",
|
|
"src/ability_event_handler.cpp",
|
|
"src/ability_loader.cpp",
|
|
"src/ability_main.cpp",
|
|
"src/ability_scheduler.cpp",
|
|
"src/ability_thread.cpp",
|
|
]
|
|
|
|
if (ability_lite_enable_ohos_appexecfwk_feature_ability == true) {
|
|
sources += [
|
|
"src/ability_slice.cpp",
|
|
"src/ability_slice_manager.cpp",
|
|
"src/ability_slice_route.cpp",
|
|
"src/ability_slice_scheduler.cpp",
|
|
"src/ability_slice_stack.cpp",
|
|
"src/ability_window.cpp",
|
|
]
|
|
}
|
|
|
|
public_deps = [
|
|
"${aafwk_lite_path}/frameworks/abilitymgr_lite:abilitymanager",
|
|
"${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
|
|
"${communication_path}/ipc/interfaces/innerkits/c/ipc:ipc_single",
|
|
"${hilog_lite_path}/frameworks/featured:hilog_shared",
|
|
"${kv_store_path}/interfaces/inner_api/kv_store:kv_store",
|
|
]
|
|
|
|
defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ]
|
|
|
|
include_dirs = [
|
|
"${aafwk_lite_path}/frameworks/abilitymgr_lite/include",
|
|
"${aafwk_lite_path}/frameworks/want_lite/include",
|
|
"${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite",
|
|
"${aafwk_lite_path}/interfaces/kits/want_lite",
|
|
"${aafwk_lite_path}/interfaces/kits/ability_lite",
|
|
"${appexecfwk_lite_path}/utils/bundle_lite",
|
|
"${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
|
|
"${appexecfwk_lite_path}/frameworks/bundle_lite/include",
|
|
"${utils_lite_path}/include",
|
|
"${communication_path}/ipc/interfaces/innerkits/c/ipc/include",
|
|
"${communication_path}/ipc/ipc/native/c/manager/include",
|
|
"${kv_store_path}/interfaces/inner_api/kv_store/include",
|
|
"${graphic_path}/surface_lite/interfaces/kits",
|
|
"${graphic_path}/../arkui/ui_lite/frameworks",
|
|
"${ability_lite_samgr_lite_path}/interfaces/kits/registry",
|
|
"${ability_lite_samgr_lite_path}/interfaces/kits/samgr",
|
|
"//third_party/bounds_checking_function/include",
|
|
"./include",
|
|
"./",
|
|
]
|
|
}
|
|
|
|
cflags = []
|
|
if (board_toolchain_type != "iccarm") {
|
|
cflags += [
|
|
"-Wall",
|
|
"-Wno-format",
|
|
"-Wno-format-extra-args",
|
|
]
|
|
}
|
|
cflags_cc = cflags
|
|
|
|
if (ability_lite_enable_ohos_appexecfwk_feature_ability == true) {
|
|
public_deps += [ "${graphic_path}/../arkui/ui_lite:ui_lite" ]
|
|
}
|
|
|
|
if (ohos_kernel_type == "liteos_m") {
|
|
include_dirs += [ "${hilog_lite_path}/interfaces/native/kits/hilog_lite" ]
|
|
}
|
|
|
|
defines += [ "OPENHARMONY_FONT_PATH" ]
|
|
|
|
if (ability_lite_enable_ohos_appexecfwk_feature_ability == true) {
|
|
defines += [ "ABILITY_WINDOW_SUPPORT" ]
|
|
}
|
|
}
|
|
|
|
lite_component("aafwk_abilitykit_lite") {
|
|
if (ability_lite_enable_ohos_appexecfwk_feature_ability == true) {
|
|
public_configs = [ ":abilitykit_config" ]
|
|
}
|
|
|
|
features = [ ":ability" ]
|
|
}
|
|
|
|
unittest("ability_main_test_lv0") {
|
|
output_extension = "bin"
|
|
output_dir = "$root_out_dir/test/unittest/MainTest_lv0"
|
|
|
|
sources = [ "${ability_lite_path}/frameworks/ability_lite/unittest/ability_main_test.cpp" ]
|
|
|
|
include_dirs = [ "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite" ]
|
|
}
|
|
|
|
config("abilitykit_config") {
|
|
ldflags = [
|
|
"-lstdc++",
|
|
"-Wl,-rpath-link=$ohos_root_path/$root_out_dir",
|
|
]
|
|
include_dirs = [
|
|
"${aafwk_lite_path}/interfaces/kits/want_lite",
|
|
"${aafwk_lite_path}/interfaces/kits/ability_lite",
|
|
"${aafwk_lite_path}/interfaces/kits/ability_lite/slite",
|
|
"${communication_path}/ipc/interfaces/innerkits/c/ipc/include",
|
|
]
|
|
}
|
|
|
|
ndk_lib("ability_notes") {
|
|
lib_extension = ".so"
|
|
deps = [
|
|
":ability",
|
|
"${aafwk_lite_path}/frameworks/abilitymgr_lite:abilitymanager",
|
|
]
|
|
head_files = [
|
|
"${aafwk_lite_path}/interfaces/kits/ability_lite",
|
|
"${aafwk_lite_path}/interfaces/kits/want_lite",
|
|
]
|
|
}
|