• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
13
14import("//build/ohos.gni")
15import("//commonlibrary/ets_utils/ets_utils_config.gni")
16import("//foundation/arkui/ace_engine/ace_config.gni")
17
18process_sources = [
19  "js_childprocess.cpp",
20  "js_process.cpp",
21  "native_module_process.cpp",
22]
23
24if (target_os == "ios" || (!is_arkui_x && host_os == "mac")) {
25  process_sources += [ "$platform_root/ios/process_helper.cpp" ]
26} else {
27  process_sources += [ "$platform_root/default/process_helper.cpp" ]
28}
29
30ohos_shared_library("process") {
31  deps = [ ":process_static" ]
32  subsystem_name = "commonlibrary"
33  part_name = "ets_utils"
34  relative_install_dir = "module"
35}
36
37ohos_source_set("process_static") {
38  include_dirs = [
39    "$process_root",
40    platform_root,
41  ]
42
43  sources = process_sources
44
45  deps = []
46  if (is_arkui_x) {
47    include_dirs += [
48      "//third_party/icu/icu4c/source/common",
49      "//third_party/node/src",
50      "$napi_root/interfaces/kits",
51      "$plugins_root/hilog/include",
52      "$plugins_root/interfaces",
53    ]
54
55    if (target_os == "android") {
56      defines = [ "ANDROID_PLATFORM" ]
57    }
58    if (target_os == "ios") {
59      defines = [ "IOS_PLATFORM" ]
60    }
61    deps += [
62      "$plugins_root/libs/icu:icu_${target_os}",
63      "$plugins_root/libs/napi:napi_${target_os}",
64      "$plugins_root/libs/securec:sec_${target_os}",
65    ]
66  } else {
67    external_deps = [ "napi:ace_napi" ]
68    if (is_standard_system) {
69      external_deps += [ "hilog:libhilog" ]
70    } else {
71      external_deps += [
72        "c_utils:utils",
73        "hilog:libhilog",
74      ]
75    }
76    deps += [
77      "//third_party/bounds_checking_function:libsec_shared",
78      "//third_party/icu/icu4c:shared_icuuc",
79    ]
80  }
81  subsystem_name = "commonlibrary"
82  part_name = "ets_utils"
83}
84
85group("process_packages") {
86  deps = [ ":process" ]
87}
88