• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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/test.gni")
15
16module_out_path = "external_device_manager/extension_device_manager"
17
18ohos_js_stage_unittest("NdkPermissionJsTest") {
19  js_build_mode = "debug"
20  hap_profile = "entry/src/main/module.json"
21  deps = [
22    ":ndkpermissionjstest_js_assets",
23    ":ndkpermissionjstest_resources",
24  ]
25  ets2abc = true
26  certificate_profile = "signature/openharmony_sx.p7b"
27  hap_name = "NdkPermissionJsTest"
28  subsystem_name = "hdf"
29  part_name = "external_device_manager"
30  module_out_path = module_out_path
31  shared_libraries = [
32    "./entry/src/main/cpp:ddk_permission_js_test",
33    ":libcppsharedso",
34    ":libhmicuucso",
35    ":libhmicui18nso",
36    ":libcppso",
37  ]
38}
39
40ohos_prebuilt_shared_library("libcppsharedso") {
41  source = rebase_path(libcxx_ndk_shared_file)
42  subsystem_name = "hdf"
43  part_name = "external_device_manager"
44}
45
46ohos_prebuilt_shared_library("libhmicuucso") {
47  if (ohos_indep_compiler_enable) {
48    source = rebase_path("//binarys/third_party/icu/innerapis/shared_icuuc/libs/libhmicuuc.z.so")
49  } else {
50    source = rebase_path("${root_out_dir}/thirdparty/icu/libhmicuuc.z.so")
51  }
52  external_deps = [ "icu:shared_icuuc" ]
53  subsystem_name = "hdf"
54  part_name = "external_device_manager"
55}
56
57ohos_prebuilt_shared_library("libhmicui18nso") {
58  if (ohos_indep_compiler_enable) {
59    source = rebase_path("//binarys/third_party/icu/innerapis/shared_icui18n/libs/libhmicui18n.z.so")
60  } else {
61    source = rebase_path("${root_out_dir}/thirdparty/icu/libhmicui18n.z.so")
62  }
63  external_deps = [ "icu:shared_icui18n" ]
64  subsystem_name = "hdf"
65  part_name = "external_device_manager"
66}
67
68ohos_prebuilt_shared_library("libcppso") {
69  dir_path = "${clang_base_path}/../llvm/lib/${abi_target}"
70  source = rebase_path("${dir_path}/libc++.so")
71  subsystem_name = "hdf"
72  part_name = "external_device_manager"
73}
74
75ohos_app_scope("ndkpermissionjstest_app_profile") {
76  app_profile = "AppScope/app.json"
77  sources = [ "AppScope/resources" ]
78}
79
80ohos_js_assets("ndkpermissionjstest_js_assets") {
81  source_dir = "entry/src/main/ets"
82}
83
84ohos_resources("ndkpermissionjstest_resources") {
85  sources = [ "entry/src/main/resources" ]
86  deps = [ ":ndkpermissionjstest_app_profile" ]
87  hap_profile = "entry/src/main/module.json"
88}
89