• 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("//build/ohos.gni")
15import("//build/toolchain/toolchain.gni")
16import("//test/xts/tools/build/suite.gni")
17
18ohos_js_hap_suite("camera_framework_ndk_hap") {
19  hap_profile = "./src/main/module.json"
20  js_build_mode = "debug"
21  deps = [
22    ":camera_ets_resources",
23    ":camera_ets_test_assets",
24  ]
25  ets2abc = true
26  certificate_profile = "signature/openharmony_sx.p7b"
27  hap_name = "ActsCameraFrameWorkNdkTest"
28  part_name = "camera_framework"
29  subsystem_name = "multimedia"
30  shared_libraries = [
31    "./src/main/cpp:entry",
32    ":libcppsharedso",
33    ":libcppso",
34  ]
35}
36
37ohos_prebuilt_shared_library("libcppsharedso") {
38  source = rebase_path(libcxx_ndk_shared_file)
39  part_name = "camera_framework"
40  subsystem_name = "multimedia"
41}
42
43ohos_prebuilt_shared_library("libcppso") {
44  if (target_cpu == "arm") {
45    source = "${clang_base_path}/../llvm/lib/arm-linux-ohos/libc++.so"
46  } else if (target_cpu == "x86_64") {
47    source = "${clang_base_path}/../llvm/lib/x86_64-unknown-linux-gnu/libc++.so"
48  } else {
49    source = "${clang_base_path}/../llvm/lib/aarch64-linux-ohos/libc++.so"
50  }
51  assert(defined(source))
52  subsystem_name = "multimedia"
53  install_enable = false
54}
55
56ohos_app_scope("camera_ets_app_profile") {
57  app_profile = "AppScope/app.json"
58  sources = [ "AppScope/resources" ]
59}
60
61ohos_js_assets("camera_ets_test_assets") {
62  source_dir = "./src/main/ets"
63}
64
65ohos_resources("camera_ets_resources") {
66  sources = [ "./src/main/resources" ]
67  deps = [ ":camera_ets_app_profile" ]
68  hap_profile = "./src/main/module.json"
69}
70