1# Copyright (c) 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. 13import("//base/print/print_fwk/print.gni") 14import("//build/ohos.gni") 15 16cflags_cc = [] 17 18config("print_interfaces_kits_napi_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ "include" ] 21 22 cflags_cc = [ "-fno-exceptions" ] 23} 24ohos_shared_library("print_napi") { 25 include_dirs = [ 26 "//third_party/node/src", 27 "//third_party/curl/include", 28 "${print_utils_path}/include", 29 "${print_path}/frameworks/helper/print_helper/include", 30 "${print_path}/frameworks/models/print_models/include", 31 "${print_path}/frameworks/innerkitsimpl/print_impl/include", 32 ] 33 public_configs = [ ":print_interfaces_kits_napi_config" ] 34 35 branch_protector_ret = "pac_ret" 36 sanitize = { 37 cfi = true 38 cfi_cross_dso = true 39 boundary_sanitize = true 40 debug = false 41 integer_overflow = true 42 ubsan = true 43 } 44 45 sources = [ 46 "src/napi_inner_print.cpp", 47 "src/napi_print_ext.cpp", 48 "src/napi_print_task.cpp", 49 "src/print_async_call.cpp", 50 "src/print_modal_ui_callback.cpp", 51 "src/print_module.cpp", 52 "src/print_task.cpp", 53 ] 54 deps = [ 55 "${print_path}/frameworks/helper/print_helper:print_helper", 56 "${print_path}/frameworks/innerkitsimpl/print_impl:print_client", 57 "${print_path}/frameworks/models/print_models:print_models", 58 ] 59 external_deps = [ 60 "ability_base:base", 61 "ability_base:want", 62 "ability_base:zuri", 63 "ability_runtime:ability_context_native", 64 "ability_runtime:ability_manager", 65 "ability_runtime:abilitykit_native", 66 "ability_runtime:data_ability_helper", 67 "ability_runtime:napi_base_context", 68 "ability_runtime:ui_extension", 69 "access_token:libaccesstoken_sdk", 70 "ace_engine:ace_uicontent", 71 "bundle_framework:appexecfwk_core", 72 "c_utils:utils", 73 "eventhandler:libeventhandler", 74 "hilog:libhilog", 75 "ipc:ipc_core", 76 "napi:ace_napi", 77 "samgr:samgr_proxy", 78 ] 79 80 if (build_variant == "user") { 81 cflags_cc += [ "-DIS_RELEASE_VERSION" ] 82 } 83 84 relative_install_dir = "module" 85 subsystem_name = "print" 86 part_name = "print_fwk" 87} 88