1# Copyright (C) 2022-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("//build/ohos/ace/ace.gni") 16 17base_output_path = get_label_info(":query_syscap", "target_out_dir") 18query_syscap_obj_path = base_output_path + "/query_syscap.o" 19 20gen_js_obj("query_syscap_js") { 21 input = "query_syscap.js" 22 output = query_syscap_obj_path 23} 24 25sources_platform_common = [ 26 "../src/syscap_tool.c", 27 "../src/create_pcid.c", 28 "../src/endian_internal.c", 29 "../interfaces/inner_api/syscap_interface.c", 30] 31 32ohos_shared_library("systemcapability") { 33 include_dirs = [ 34 "//third_party/node/src", 35 "//foundation/arkui/napi/interfaces/kits", 36 "//developtools/syscap_codec/src", 37 "//developtools/syscap_codec/napi", 38 "//developtools/syscap_codec/interfaces/inner_api", 39 "//developtools/syscap_codec/include", 40 ] 41 42 sources = [ "napi_query_syscap.cpp" ] 43 sources += sources_platform_common 44 45 deps = [ 46 ":query_syscap_js", 47 "//third_party/bounds_checking_function:libsec_static", 48 ] 49 50 external_deps = [ "napi:ace_napi" ] 51 52 if (defined(ohos_lite)) { 53 deps += [ "//build/lite/config/component/cJSON:cjson_static" ] 54 } else { 55 deps += [ "//third_party/cJSON:cjson_static" ] 56 } 57 58 relative_install_dir = "module" 59 subsystem_name = "developtools" 60 part_name = "syscap_codec" 61} 62