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