# 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("//foundation/arkui/ace_engine/ace_config.gni") import( "//foundation/arkui/ace_engine/adapter/ohos/services/uiservice/uiservicems.gni") ohos_prebuilt_etc("ui_service.cfg") { relative_install_dir = "init" source = "ui_service.cfg" part_name = ace_engine_part subsystem_name = ace_engine_subsystem } group("uiservice_target") { deps = [ ":uiservice" ] } group("unittest") { testonly = true deps = [ "test:unittest" ] } config("uiservicems_config") { include_dirs = [ "include/", "$ace_root/interfaces/inner_api/ui_service_manager/include", ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } } template("uiservice_static") { forward_variables_from(invoker, "*") ohos_source_set(target_name) { subsystem_name = ace_engine_subsystem part_name = ace_engine_part defines += invoker.defines cflags_cc += invoker.cflags_cc branch_protector_ret = "pac_ret" sources = uiservice_files configs = [ ":uiservicems_config", "$ace_root:ace_config", ] external_deps = [ "ability_base:want", "access_token:libtokenid_sdk", "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", ] if (uiservice_xcollie_enable) { external_deps += [ "hicollie:libhicollie" ] defines += [ "UISERVICE_MGR_XCOLLIE_ENABLE" ] } } } foreach(item, ace_platforms) { platform = item.name if (platform == "ohos") { # generate uiservice_static lib uiservice_static("uiservice_static_" + item.name) { defines = [] config = { } if (defined(item.config)) { config = item.config } if (defined(config.defines)) { defines = config.defines } if (defined(config.cflags_cc)) { cflags_cc = config.cflags_cc } } } } ohos_shared_library("uiservice") { sanitize = { cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" deps = [ ":uiservice_static_ohos" ] part_name = ace_engine_part subsystem_name = ace_engine_subsystem configs = [ "$ace_root:ace_coverage_config" ] external_deps = [ "hilog:libhilog" ] }