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