• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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")
16import("napi_lib.gni")
17
18common_targets = []
19foreach(module, common_napi_libs) {
20  if (use_mac) {
21    ace_napi_lib(module) {
22      platform = "mac"
23    }
24  } else if (use_mingw_win) {
25    ace_napi_lib(module) {
26      platform = "windows"
27    }
28  } else if (use_linux) {
29    ace_napi_lib(module) {
30      platform = "linux"
31    }
32  } else if (!is_cross_platform_build) {
33    ace_napi_lib(module) {
34      platform = "ohos"
35    }
36  }
37  common_targets += [ ":$module" ]
38}
39
40group("napi_group") {
41  if (use_mac || use_mingw_win || use_linux) {
42    public_deps = common_targets
43  } else {
44    deps = common_targets
45    deps += [ "$ace_root/interfaces/napi/kits/plugincomponent:plugincomponent" ]
46  }
47}
48