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 = [ 20 "${ace_root}/interfaces/inner_api/ace", 21 "${ace_root}/interfaces/inner_api/ace/ai/", 22 ] 23} 24 25config("uicontent_config") { 26 visibility = [ ":*" ] 27 include_dirs = [ 28 "//base/notification/common_event_service/interfaces/inner_api", 29 "//foundation/graphic/graphic_2d/rosen/modules/platform/utils", 30 ] 31 if (!use_mingw_win && !use_mac && !use_linux) { 32 defines = uicast_configs.uicast_defines 33 } 34} 35 36config("preview_config") { 37 visibility = [ ":*" ] 38 if (use_mingw_win) { 39 defines = [ 40 "PREVIEW", 41 "WINDOWS_PLATFORM", 42 ] 43 } else if (use_mac) { 44 defines = [ 45 "PREVIEW", 46 "MAC_PLATFORM", 47 ] 48 } else if (use_linux) { 49 defines = [ 50 "PREVIEW", 51 "LINUX_PLATFORM", 52 ] 53 } 54} 55 56ohos_shared_library("ace_uicontent") { 57 if (current_os == "ohos") { 58 sanitize = { 59 integer_overflow = true 60 boundary_sanitize = true 61 debug = ace_sanitize_debug 62 } 63 } 64 include_dirs = [ "//base/startup/init/interfaces/innerkits/include/syspara" ] 65 66 public_configs = [ ":uicontent_public_config" ] 67 68 configs = [ 69 ":uicontent_config", 70 ":preview_config", 71 "$ace_root:ace_config", 72 "$ace_root:ace_coverage_config", 73 ] 74 75 sources = [ 76 "${ace_root}/interfaces/inner_api/ace/declarative_module_preloader.cpp", 77 "${ace_root}/interfaces/inner_api/ace/hot_reloader.cpp", 78 "${ace_root}/interfaces/inner_api/ace/navigation_controller.cpp", 79 "${ace_root}/interfaces/inner_api/ace/serializeable_object.cpp", 80 "${ace_root}/interfaces/inner_api/ace/ui_content.cpp", 81 "${ace_root}/interfaces/inner_api/ace/ui_event.cpp", 82 "${ace_root}/interfaces/inner_api/ace/ui_event_func.cpp", 83 ] 84 85 if (!use_mingw_win && !use_mac && !use_linux && 86 defined(uicast_configs.uicast_enable)) { 87 sources += 88 [ "${ace_root}/interfaces/inner_api/ace/uicast/uicast_subscriber.cpp" ] 89 external_deps = [ 90 "ability_base:want", 91 "common_event_service:cesfwk_innerkits", 92 "hilog:libhilog", 93 ] 94 } 95 deps = [ ":ace_forward_compatibility" ] 96 97 subsystem_name = ace_engine_subsystem 98 innerapi_tags = [ "platformsdk_indirect" ] 99 part_name = ace_engine_part 100} 101 102ohos_shared_library("ace_forward_compatibility") { 103 include_dirs = [ 104 "//base/startup/init/interfaces/innerkits/include/syspara", 105 "${ace_root}/frameworks", 106 ] 107 108 public_configs = [ ":uicontent_public_config" ] 109 110 sources = 111 [ "${ace_root}/interfaces/inner_api/ace/ace_forward_compatibility.cpp" ] 112 113 configs = [ 114 ":preview_config", 115 "$ace_root:ace_config", 116 "$ace_root:ace_coverage_config", 117 ] 118 119 external_deps = [ "hilog:libhilog" ] 120 121 if (current_os == "ohos") { 122 defines = [ "OHOS_PLATFORM" ] 123 external_deps += [ "init:libbegetutil" ] 124 } 125 126 subsystem_name = ace_engine_subsystem 127 innerapi_tags = [ "platformsdk_indirect" ] 128 part_name = ace_engine_part 129} 130