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("../../../resmgr.gni") 16 17config("resourcemanager_preview_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "../../../frameworks/resmgr/include", 22 "../../inner_api/include", 23 ] 24} 25 26ohos_shared_library("resourcemanager") { 27 include_dirs = [ 28 "../../../dfx/hisysevent_adapter", 29 "../../../frameworks/resmgr/include", 30 "../../inner_api/include", 31 ] 32 33 sources = [ 34 "../../../dfx/hisysevent_adapter/hisysevent_adapter.cpp", 35 "src/resource_manager_napi.cpp", 36 ] 37 38 defines = [ "CONFIG_HILOG" ] 39 40 deps = [ "../innerkits/core:resmgr_napi_core" ] 41 42 external_deps = [ 43 "ability_runtime:abilitykit_native", 44 "ability_runtime:extensionkit_native", 45 "ability_runtime:runtime", 46 "c_utils:utils", 47 "hilog:libhilog", 48 "hisysevent:libhisysevent", 49 "hitrace:hitrace_meter", 50 "ipc:ipc_single", 51 "napi:ace_napi", 52 ] 53 54 stack_protector_ret = true 55 sanitize = { 56 boundary_sanitize = true 57 cfi = true 58 cfi_cross_dso = true 59 debug = false 60 integer_overflow = true 61 ubsan = true 62 } 63 relative_install_dir = "module" 64 subsystem_name = "global" 65 part_name = "resource_management" 66} 67 68ohos_shared_library("resourcemanager_preview") { 69 if (is_mingw || is_mac || is_linux) { 70 output_name = "resourcemanager" 71 defines = [ 72 "__IDE_PREVIEW__", 73 ] 74 75 if (is_mingw) { 76 defines += [ 77 "__WINNT__", 78 "__EXPORT_MGR__", 79 ] 80 } else if (is_linux) { 81 defines += [ "__LINUX__" ] 82 } 83 84 public_configs = [ ":resourcemanager_preview_config" ] 85 86 sources = [ 87 "src/resource_manager_napi.cpp", 88 ] 89 90 defines += [ "CONFIG_HILOG" ] 91 92 deps = [ "../innerkits/core:resmgr_napi_core_preview" ] 93 94 external_deps = [ 95 "hilog:libhilog", 96 "napi:ace_napi", 97 ] 98 } 99 subsystem_name = "global" 100 part_name = "resource_management" 101} 102 103ohos_shared_library("sendableresourcemanager") { 104 include_dirs = [ 105 "../../inner_api/include", 106 "../../../frameworks/resmgr/include", 107 ] 108 109 sources = [ "src/sendable_resource_manager_napi.cpp" ] 110 111 defines = [ "CONFIG_HILOG" ] 112 113 external_deps = [ 114 "hilog:libhilog", 115 "napi:ace_napi", 116 ] 117 118 stack_protector_ret = true 119 sanitize = { 120 boundary_sanitize = true 121 cfi = true 122 cfi_cross_dso = true 123 debug = false 124 integer_overflow = true 125 ubsan = true 126 } 127 relative_install_dir = "module" 128 subsystem_name = "global" 129 part_name = "resource_management" 130} 131 132ohos_shared_library("sendableresourcemanager_preview") { 133 if (is_mingw || is_mac || is_linux) { 134 output_name = "sendableresourcemanager" 135 include_dirs = [ 136 "../../inner_api/include", 137 "../../../frameworks/resmgr/include", 138 ] 139 140 sources = [ "src/sendable_resource_manager_napi.cpp" ] 141 142 defines = [ "CONFIG_HILOG" ] 143 144 external_deps = [ 145 "hilog:libhilog", 146 "napi:ace_napi", 147 ] 148 } 149 subsystem_name = "global" 150 part_name = "resource_management" 151}