window_window_manager/wm/BUILD.gn
lpf b2a72db4fd 部件依赖
Signed-off-by: lpf <liaopengfei@h-partners.com>
2024-10-29 21:32:15 +08:00

439 lines
12 KiB
Plaintext

# Copyright (c) 2021-2022 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("../windowmanager_aafwk.gni")
config("libwm_private_config") {
visibility = [ ":*" ]
include_dirs = [
"include",
"../wmserver/include",
"../wmserver/include/zidl",
"../window_scene/session/host/include",
]
}
config("libwm_public_config") {
include_dirs = [
"../interfaces/innerkits",
"../interfaces/innerkits/dm",
"../interfaces/innerkits/wm",
"../utils/include",
"../window_scene",
]
}
## Build libwm_static.a
ohos_static_library("libwm_static") {
branch_protector_ret = "pac_ret"
sanitize = {
cfi = true
cfi_cross_dso = true
cfi_vcall_icall_only = true
debug = false
integer_overflow = true
ubsan = true
boundary_sanitize = true
}
include_dirs = [
"../utils/include",
"../window_scene/intention_event/service/anr_manager/include",
"../window_scene/intention_event/framework/anr_handler/include",
"${window_base_path}/interfaces/innerkits/dm",
"${window_base_path}/window_scene/intention_event/include",
]
sources = [
"../wmserver/src/zidl/window_manager_proxy.cpp",
"src/extension_window.cpp",
"src/extension_window_impl.cpp",
"src/future_callback.cpp",
"src/gtx_input_event_sender.cpp",
"src/input_transfer_station.cpp",
"src/pattern_detach_callback.cpp",
"src/picture_in_picture_controller.cpp",
"src/picture_in_picture_manager.cpp",
"src/picture_in_picture_option.cpp",
"src/root_scene.cpp",
"src/screen_scene.cpp",
"src/static_call.cpp",
"src/window.cpp",
"src/window_accessibility_controller.cpp",
"src/window_adapter.cpp",
"src/window_agent.cpp",
"src/window_display_change_adapter.cpp",
"src/window_extension_session_impl.cpp",
"src/window_impl.cpp",
"src/window_input_channel.cpp",
"src/window_manager.cpp",
"src/window_manager_agent.cpp",
"src/window_option.cpp",
"src/window_prepare_terminate.cpp",
"src/window_scene.cpp",
"src/window_scene_session_impl.cpp",
"src/window_session_impl.cpp",
"src/zidl/pattern_detach_callback_proxy.cpp",
"src/zidl/pattern_detach_callback_stub.cpp",
"src/zidl/window_manager_agent_stub.cpp",
"src/zidl/window_stub.cpp",
]
configs = [
":libwm_private_config",
"${window_base_path}/resources/config/build:coverage_flags",
]
public_configs = [ ":libwm_public_config" ]
deps = [
"${window_base_path}/dm:libdm",
"${window_base_path}/utils:libwmutil",
"${window_base_path}/utils:libwmutil_base",
"${window_base_path}/window_scene/common:window_scene_common",
"${window_base_path}/window_scene/intention_event:libintention_event",
"${window_base_path}/window_scene/intention_event/service:intention_event_anr_manager",
"${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
"${window_base_path}/window_scene/session:scene_session",
"${window_base_path}/window_scene/session_manager:session_manager",
]
external_deps = [
"ability_base:configuration",
"ability_base:want",
"ability_runtime:ability_context_native",
"ability_runtime:ability_manager",
"ability_runtime:app_manager",
"accessibility:accessibility_common",
"ace_engine:ace_uicontent",
"ace_engine:ace_xcomponent_controller",
"bundle_framework:appexecfwk_core",
"bundle_framework:libappexecfwk_common",
"c_utils:utils",
"eventhandler:libeventhandler",
"graphic_2d:librender_service_client",
"graphic_2d:window_animation",
"hilog:libhilog",
"hisysevent:libhisysevent",
"hitrace:hitrace_meter",
"image_framework:image_native",
"init:libbegetutil",
"input:libmmi-client",
"ipc:ipc_single",
"napi:ace_napi",
"samgr:samgr_proxy",
]
defines = []
if (defined(global_parts_info) &&
defined(global_parts_info.barrierfree_accessibility)) {
external_deps += [ "accessibility:accessibility_common" ]
}
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_resource_schedule_service)) {
external_deps += [ "resource_schedule_service:ressched_client" ]
defines += [ "RESOURCE_SCHEDULE_SERVICE_ENABLE" ]
}
if (defined(global_parts_info) &&
defined(global_parts_info.powermgr_power_manager)) {
external_deps += [ "power_manager:powermgr_client" ]
defines += [ "POWER_MANAGER_ENABLE" ]
}
if (!defined(global_parts_info) ||
defined(global_parts_info.inputmethod_imf)) {
imf_enable = true
} else {
imf_enable = false
}
print("imf_enable: ", imf_enable)
if (imf_enable == true) {
external_deps += [ "imf:inputmethod_client" ]
defines += [ "IMF_ENABLE" ]
}
part_name = "window_manager"
subsystem_name = "window"
}
## Build libwm.so
ohos_shared_library("libwm") {
branch_protector_ret = "pac_ret"
sanitize = {
cfi = true
cfi_cross_dso = true
cfi_vcall_icall_only = true
debug = false
}
include_dirs = [
"../utils/include",
"../window_scene/intention_event/service/anr_manager/include",
"../window_scene/intention_event/framework/anr_handler/include",
"${window_base_path}/interfaces/innerkits/dm",
"${window_base_path}/window_scene/intention_event/include",
]
sources = [
"../wmserver/src/zidl/window_manager_proxy.cpp",
"src/extension_window.cpp",
"src/extension_window_impl.cpp",
"src/future_callback.cpp",
"src/gtx_input_event_sender.cpp",
"src/input_transfer_station.cpp",
"src/pattern_detach_callback.cpp",
"src/picture_in_picture_controller.cpp",
"src/picture_in_picture_manager.cpp",
"src/picture_in_picture_option.cpp",
"src/root_scene.cpp",
"src/screen_scene.cpp",
"src/static_call.cpp",
"src/window.cpp",
"src/window_accessibility_controller.cpp",
"src/window_adapter.cpp",
"src/window_agent.cpp",
"src/window_display_change_adapter.cpp",
"src/window_extension_session_impl.cpp",
"src/window_impl.cpp",
"src/window_input_channel.cpp",
"src/window_manager.cpp",
"src/window_manager_agent.cpp",
"src/window_option.cpp",
"src/window_prepare_terminate.cpp",
"src/window_scene.cpp",
"src/window_scene_session_impl.cpp",
"src/window_session_impl.cpp",
"src/zidl/pattern_detach_callback_proxy.cpp",
"src/zidl/pattern_detach_callback_stub.cpp",
"src/zidl/window_manager_agent_stub.cpp",
"src/zidl/window_stub.cpp",
]
configs = [
":libwm_private_config",
"../resources/config/build:coverage_flags",
]
public_configs = [ ":libwm_public_config" ]
deps = [
"${window_base_path}/utils:libwmutil",
"${window_base_path}/utils:libwmutil_base",
"${window_base_path}/window_scene/common:window_scene_common",
"${window_base_path}/window_scene/intention_event:libintention_event",
"${window_base_path}/window_scene/intention_event/service:intention_event_anr_manager",
"${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
"${window_base_path}/window_scene/session:scene_session",
"${window_base_path}/window_scene/session_manager:session_manager",
"../dm:libdm",
]
external_deps = [
"ability_base:configuration",
"ability_base:want",
"ability_runtime:ability_context_native",
"ability_runtime:ability_manager",
"ability_runtime:app_context",
"ability_runtime:app_manager",
"accessibility:accessibility_common",
"ace_engine:ace_uicontent",
"ace_engine:ace_xcomponent_controller",
"bundle_framework:appexecfwk_core",
"bundle_framework:libappexecfwk_common",
"c_utils:utils",
"eventhandler:libeventhandler",
"graphic_2d:librender_service_base",
"graphic_2d:librender_service_client",
"graphic_2d:window_animation",
"hilog:libhilog",
"hisysevent:libhisysevent",
"hitrace:hitrace_meter",
"image_framework:image_native",
"init:libbegetutil",
"input:libmmi-client",
"ipc:ipc_single",
"napi:ace_napi",
"samgr:samgr_proxy",
]
defines = []
if (defined(global_parts_info) &&
defined(global_parts_info.barrierfree_accessibility)) {
external_deps += [ "accessibility:accessibility_common" ]
}
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_resource_schedule_service)) {
external_deps += [ "resource_schedule_service:ressched_client" ]
defines += [ "RESOURCE_SCHEDULE_SERVICE_ENABLE" ]
}
if (!defined(global_parts_info) ||
defined(global_parts_info.inputmethod_imf)) {
imf_enable = true
} else {
imf_enable = false
}
if (defined(global_parts_info) &&
defined(global_parts_info.powermgr_power_manager)) {
external_deps += [ "power_manager:powermgr_client" ]
defines += [ "POWER_MANAGER_ENABLE" ]
}
print("imf_enable: ", imf_enable)
if (imf_enable == true) {
external_deps += [ "imf:inputmethod_client" ]
defines += [ "IMF_ENABLE" ]
}
part_name = "window_manager"
subsystem_name = "window"
if (build_variant == "user") {
defines += [ "IS_RELEASE_VERSION" ]
}
}
## Build libwm_lite.so
ohos_shared_library("libwm_lite") {
defines = [ "USE_ADAPTER_LITE" ]
include_dirs = [
"../interfaces/innerkits/wm",
"../utils/include",
]
sources = [
"../utils/src/window_visibility_info.cpp",
"src/window_adapter_lite.cpp",
"src/window_manager_agent_lite.cpp",
"src/window_manager_lite.cpp",
"src/window_option.cpp",
"src/zidl/window_manager_agent_stub.cpp",
]
configs = [
":libwm_private_config",
"../resources/config/build:coverage_flags",
]
deps = [
"${window_base_path}/utils:libwmutil_base",
"${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
"${window_base_path}/window_scene/session_manager:session_manager_lite",
]
public_configs = [ ":libwm_public_config" ]
external_deps = [
"ability_runtime:ability_manager",
"accessibility:accessibility_common",
"bundle_framework:appexecfwk_core",
"c_utils:utils",
"hilog:libhilog",
"image_framework:image_native",
"init:libbegetutil",
"ipc:ipc_single",
"samgr:samgr_proxy",
]
defines += [ "FRAME_TRACE_ENABLE" ]
external_deps += [ "frame_aware_sched:frame_trace_intf" ]
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_resource_schedule_service)) {
external_deps += [ "resource_schedule_service:ressched_client" ]
defines += [ "RESOURCE_SCHEDULE_SERVICE_ENABLE" ]
}
if (!defined(global_parts_info) ||
defined(global_parts_info.inputmethod_imf)) {
imf_enable = true
} else {
imf_enable = false
}
if (defined(global_parts_info) &&
defined(global_parts_info.powermgr_power_manager)) {
external_deps += [ "power_manager:powermgr_client" ]
defines += [ "POWER_MANAGER_ENABLE" ]
}
print("imf_enable: ", imf_enable)
if (imf_enable == true) {
external_deps += [ "imf:inputmethod_client" ]
defines += [ "IMF_ENABLE" ]
}
part_name = "window_manager"
subsystem_name = "window"
if (build_variant == "user") {
defines += [ "IS_RELEASE_VERSION" ]
}
}
group("test") {
testonly = true
deps = [ "test:test" ]
}
## Build libwm_ndk.so
ohos_shared_library("libwm_ndk") {
output_name = "libnative_window_manager"
output_extension = "so"
branch_protector_ret = "pac_ret"
sanitize = {
cfi = true
cfi_cross_dso = true
cfi_vcall_icall_only = true
debug = false
}
include_dirs = [
"${window_base_path}/interfaces/kits/ndk/wm",
"${window_base_path}/interfaces/inner_kits/wm",
]
sources = [ "src/oh_window_event_filter.cpp" ]
deps = [
":libwm",
"${window_base_path}/utils:libwmutil_base",
]
innerapi_tags = [ "ndk" ]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
"input:libmmi-client",
"input:oh_input_manager",
"ipc:ipc_core",
]
part_name = "window_manager"
subsystem_name = "window"
}