• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("//base/print/print_fwk/print.gni")
15import("//build/ohos.gni")
16
17config("ability_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "${print_path}/frameworks/innerkitsimpl/include",
21    "${print_path}/frameworks/kits/extension/include",
22    "${print_utils_path}/include",
23    "//third_party/node/src",
24  ]
25
26  cflags = []
27  if (target_cpu == "arm") {
28    cflags += [ "-DBINDER_IPC_32BIT" ]
29  }
30  defines = [
31    "APP_LOG_TAG = \"Ability\"",
32    "LOG_DOMAIN = 0xD002200",
33  ]
34}
35
36config("ability_public_config") {
37  visibility = [ ":*" ]
38  include_dirs = [
39    "${print_path}/frameworks/innerkitsimpl/include",
40    "${print_path}/frameworks/kits/extension/include",
41    "//third_party/libuv/include",
42    "//third_party/json/include",
43  ]
44
45  cflags_cc = [ "-fno-exceptions" ]
46}
47
48ohos_shared_library("print_extension_framework") {
49  include_dirs = [
50    "${print_path}/frameworks/helper/include",
51    "${print_path}/frameworks/innerkitsimpl/include",
52    "${print_path}/frameworks/kits/extension/include",
53  ]
54
55  sources = [
56    "src/js_print_callback.cpp",
57    "src/js_print_extension.cpp",
58    "src/js_print_extension_connection.cpp",
59    "src/js_print_extension_context.cpp",
60    "src/print_extension.cpp",
61    "src/print_extension_context.cpp",
62  ]
63  configs = [ ":ability_config" ]
64  public_configs = [
65    ":ability_public_config",
66    "${ability_runtime_path}/frameworks/native/ability:ability_context_public_config",
67  ]
68
69  deps = [
70    "${print_path}/frameworks/helper:print_helper",
71    "${print_path}/frameworks/innerkitsimpl:print_client",
72  ]
73
74  external_deps = [
75    "ability_base:want",
76    "ability_runtime:ability_context_native",
77    "ability_runtime:ability_manager",
78    "ability_runtime:abilitykit_native",
79    "ability_runtime:app_context",
80    "ability_runtime:runtime",
81    "c_utils:utils",
82    "common_event_service:cesfwk_innerkits",
83    "eventhandler:libeventhandler",
84    "hilog:libhilog",
85    "hitrace:hitrace_meter",
86    "i18n:intl_util",
87    "ipc:ipc_napi_common",
88    "ipc_js:rpc",
89    "napi:ace_napi",
90    "resource_management:global_resmgr",
91  ]
92
93  subsystem_name = "print"
94  part_name = "print_fwk"
95}
96
97ohos_shared_library("print_extension_module") {
98  sources = [ "${print_path}/frameworks/kits/extension/src/print_extension_module_loader.cpp" ]
99
100  configs = [ ":ability_config" ]
101  public_configs = [ ":ability_public_config" ]
102
103  deps = [ ":print_extension_framework" ]
104
105  external_deps = [
106    "ability_base:base",
107    "ability_base:want",
108    "ability_base:zuri",
109    "ability_runtime:abilitykit_native",
110    "ability_runtime:runtime",
111    "c_utils:utils",
112    "common_event_service:cesfwk_innerkits",
113    "hilog:libhilog",
114    "hisysevent:libhisysevent",
115    "hitrace:hitrace_meter",
116    "i18n:intl_util",
117    "napi:ace_napi",
118    "resource_management:global_resmgr",
119  ]
120  relative_install_dir = "extensionability"
121  subsystem_name = "print"
122  part_name = "print_fwk"
123}
124