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