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/ohos.gni")
15import("//foundation/arkui/ace_engine/ace_config.gni")
16
17ohos_shared_library("componenttest") {
18  if (defined(current_platform.name)) {
19    platform = current_platform.name
20
21    defines = []
22    cflags_cc = []
23    config = {
24    }
25    if (defined(current_platform.config)) {
26      config = current_platform.config
27    }
28    if (defined(config.defines)) {
29      defines += config.defines
30    }
31    if (defined(config.cflags_cc)) {
32      cflags_cc += config.cflags_cc
33    }
34    configs = [ "$ace_root:ace_config" ]
35
36    sources = [
37      "js_component_test.cpp",
38      "js_component_test_component.cpp",
39      "js_component_test_matcher.cpp",
40      "js_component_test_tester.cpp",
41      "js_component_test_utils.cpp",
42    ]
43
44    deps = [
45      "$ace_root/build:libace_compatible",
46      "../utils:napi_utils_static_${platform}",
47    ]
48
49    if (defined(config.libace_target)) {
50      deps += [ config.libace_target ]
51    }
52
53    external_deps = [ "napi:ace_napi" ]
54
55    include_dirs = [
56      "$ace_root",
57      "$ace_root/frameworks",
58      "$root_out_dir/arkui/framework",
59    ]
60
61    relative_install_dir = "module/arkui"
62    subsystem_name = ace_engine_subsystem
63    part_name = ace_engine_part
64  }
65}
66