146debc2cSopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
246debc2cSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
346debc2cSopenharmony_ci# you may not use this file except in compliance with the License.
446debc2cSopenharmony_ci# You may obtain a copy of the License at
546debc2cSopenharmony_ci#
646debc2cSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
746debc2cSopenharmony_ci#
846debc2cSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
946debc2cSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1046debc2cSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1146debc2cSopenharmony_ci# See the License for the specific language governing permissions and
1246debc2cSopenharmony_ci# limitations under the License.
1346debc2cSopenharmony_ciimport("//base/print/print_fwk/print.gni")
1446debc2cSopenharmony_ciimport("//build/ohos.gni")
1546debc2cSopenharmony_ci
1646debc2cSopenharmony_cicflags_cc = []
1746debc2cSopenharmony_ci
1846debc2cSopenharmony_ciconfig("print_ndk_config") {
1946debc2cSopenharmony_ci  visibility = [ ":*" ]
2046debc2cSopenharmony_ci  include_dirs = []
2146debc2cSopenharmony_ci
2246debc2cSopenharmony_ci  cflags_cc += [ "-fno-exceptions" ]
2346debc2cSopenharmony_ci}
2446debc2cSopenharmony_ciohos_shared_library("ohprint") {
2546debc2cSopenharmony_ci  include_dirs = [
2646debc2cSopenharmony_ci    "${print_path}/frameworks/ohprint/include",
2746debc2cSopenharmony_ci    "${print_utils_path}/include",
2846debc2cSopenharmony_ci    "${print_path}/frameworks/helper/print_helper/include",
2946debc2cSopenharmony_ci    "${print_path}/frameworks/models/print_models/include",
3046debc2cSopenharmony_ci    "${print_path}/services/print_service/include",
3146debc2cSopenharmony_ci  ]
3246debc2cSopenharmony_ci  public_configs = [ ":print_ndk_config" ]
3346debc2cSopenharmony_ci
3446debc2cSopenharmony_ci  branch_protector_ret = "pac_ret"
3546debc2cSopenharmony_ci  sanitize = {
3646debc2cSopenharmony_ci    cfi = true
3746debc2cSopenharmony_ci    cfi_cross_dso = true
3846debc2cSopenharmony_ci    boundary_sanitize = true
3946debc2cSopenharmony_ci    debug = false
4046debc2cSopenharmony_ci    integer_overflow = true
4146debc2cSopenharmony_ci    ubsan = true
4246debc2cSopenharmony_ci  }
4346debc2cSopenharmony_ci
4446debc2cSopenharmony_ci  sources = [
4546debc2cSopenharmony_ci    "src/print_capi.cpp",
4646debc2cSopenharmony_ci    "src/print_converter.cpp",
4746debc2cSopenharmony_ci    "src/print_helper.cpp",
4846debc2cSopenharmony_ci  ]
4946debc2cSopenharmony_ci
5046debc2cSopenharmony_ci  deps = [
5146debc2cSopenharmony_ci    "${print_path}/frameworks/helper/print_helper:print_helper",
5246debc2cSopenharmony_ci    "${print_path}/frameworks/innerkitsimpl/print_impl:print_client",
5346debc2cSopenharmony_ci    "${print_path}/frameworks/models/print_models:print_models",
5446debc2cSopenharmony_ci    "${print_path}/services/print_service:print_service",
5546debc2cSopenharmony_ci  ]
5646debc2cSopenharmony_ci
5746debc2cSopenharmony_ci  external_deps = [
5846debc2cSopenharmony_ci    "ability_base:base",
5946debc2cSopenharmony_ci    "ability_base:want",
6046debc2cSopenharmony_ci    "ability_base:zuri",
6146debc2cSopenharmony_ci    "ability_runtime:ability_context_native",
6246debc2cSopenharmony_ci    "ability_runtime:ability_manager",
6346debc2cSopenharmony_ci    "ability_runtime:abilitykit_native",
6446debc2cSopenharmony_ci    "ability_runtime:data_ability_helper",
6546debc2cSopenharmony_ci    "ability_runtime:napi_base_context",
6646debc2cSopenharmony_ci    "ability_runtime:ui_extension",
6746debc2cSopenharmony_ci    "access_token:libaccesstoken_sdk",
6846debc2cSopenharmony_ci    "bundle_framework:appexecfwk_base",
6946debc2cSopenharmony_ci    "bundle_framework:appexecfwk_core",
7046debc2cSopenharmony_ci    "c_utils:utils",
7146debc2cSopenharmony_ci    "common_event_service:cesfwk_innerkits",
7246debc2cSopenharmony_ci    "eventhandler:libeventhandler",
7346debc2cSopenharmony_ci    "hilog:libhilog",
7446debc2cSopenharmony_ci    "hisysevent:libhisysevent",
7546debc2cSopenharmony_ci    "init:libbegetutil",
7646debc2cSopenharmony_ci    "ipc:ipc_core",
7746debc2cSopenharmony_ci    "napi:ace_napi",
7846debc2cSopenharmony_ci    "os_account:os_account_innerkits",
7946debc2cSopenharmony_ci    "safwk:system_ability_fwk",
8046debc2cSopenharmony_ci    "samgr:samgr_proxy",
8146debc2cSopenharmony_ci  ]
8246debc2cSopenharmony_ci
8346debc2cSopenharmony_ci  if (build_variant == "user") {
8446debc2cSopenharmony_ci    cflags_cc += [ "-DIS_RELEASE_VERSION" ]
8546debc2cSopenharmony_ci  }
8646debc2cSopenharmony_ci
8746debc2cSopenharmony_ci  relative_install_dir = "ndk"
8846debc2cSopenharmony_ci  output_name = "ohprint"
8946debc2cSopenharmony_ci  output_extension = "so"
9046debc2cSopenharmony_ci
9146debc2cSopenharmony_ci  install_enable = true
9246debc2cSopenharmony_ci  subsystem_name = "print"
9346debc2cSopenharmony_ci  part_name = "print_fwk"
9446debc2cSopenharmony_ci}
95