1# Copyright (c) 2021-2022 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. 13 14import("//build/ohos.gni") 15import("//foundation/arkui/ace_engine/ace_config.gni") 16import("//foundation/arkui/ace_engine/build/uicast.gni") 17 18config("uicontent_public_config") { 19 include_dirs = [ "${ace_root}/interfaces/inner_api/ace" ] 20} 21 22config("uicontent_config") { 23 visibility = [ ":*" ] 24 include_dirs = [ 25 "//base/notification/common_event_service/interfaces/inner_api", 26 "//foundation/graphic/graphic_2d/rosen/modules/platform/utils", 27 ] 28 if (use_mingw_win) { 29 defines = [ 30 "PREVIEW", 31 "WINDOWS_PLATFORM", 32 ] 33 } else if (use_mac) { 34 defines = [ 35 "PREVIEW", 36 "MAC_PLATFORM", 37 ] 38 } else if (use_linux) { 39 defines = [ 40 "PREVIEW", 41 "LINUX_PLATFORM", 42 ] 43 } else { 44 defines = uicast_configs.uicast_defines 45 } 46} 47 48ohos_shared_library("ace_uicontent") { 49 if (current_os == "ohos") { 50 sanitize = { 51 integer_overflow = true 52 boundary_sanitize = true 53 debug = ace_sanitize_debug 54 } 55 } 56 57 public_configs = [ ":uicontent_public_config" ] 58 59 configs = [ 60 ":uicontent_config", 61 "$ace_root:ace_config", 62 "$ace_root:ace_coverage_config", 63 ] 64 65 sources = [ 66 "${ace_root}/interfaces/inner_api/ace/declarative_module_preloader.cpp", 67 "${ace_root}/interfaces/inner_api/ace/hot_reloader.cpp", 68 "${ace_root}/interfaces/inner_api/ace/serializeable_object.cpp", 69 "${ace_root}/interfaces/inner_api/ace/ui_content.cpp", 70 ] 71 72 if (!use_mingw_win && !use_mac && !use_linux && 73 defined(uicast_configs.uicast_enable)) { 74 sources += 75 [ "${ace_root}/interfaces/inner_api/ace/uicast/uicast_subscriber.cpp" ] 76 external_deps = [ 77 "ability_base:want", 78 "common_event_service:cesfwk_innerkits", 79 "hilog:libhilog", 80 ] 81 } 82 83 subsystem_name = ace_engine_subsystem 84 innerapi_tags = [ "platformsdk_indirect" ] 85 part_name = ace_engine_part 86} 87