mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 10:21:25 -04:00
a63bc6f15c
Signed-off-by: yudechen <chenyude@huawei.com> Change-Id: I0f4c2fce72bfa859c4535890d29431afab489995
68 lines
1.9 KiB
Plaintext
68 lines
1.9 KiB
Plaintext
# Copyright (C) 2022-2022 Huawei Device Co., Ltd.
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import("//build/ohos.gni")
|
|
import("//build/ohos/ace/ace.gni")
|
|
import("../config.gni")
|
|
|
|
base_output_path = get_label_info(":query_syscap", "target_out_dir")
|
|
query_syscap_obj_path = base_output_path + "/query_syscap.o"
|
|
|
|
gen_js_obj("query_syscap_js") {
|
|
input = "query_syscap.js"
|
|
output = query_syscap_obj_path
|
|
}
|
|
|
|
sources_platform_common = [
|
|
"../src/syscap_tool.c",
|
|
"../src/create_pcid.c",
|
|
"../src/endian_internal.c",
|
|
"../interfaces/inner_api/syscap_interface.c",
|
|
]
|
|
|
|
ohos_shared_library("systemcapability") {
|
|
include_dirs = [
|
|
"../src",
|
|
"../interfaces/inner_api",
|
|
"../include",
|
|
]
|
|
include_dirs += [ syscap_codec_config_path ]
|
|
|
|
sources = [ "napi_query_syscap.cpp" ]
|
|
sources += sources_platform_common
|
|
|
|
deps = [
|
|
":query_syscap_js",
|
|
"//third_party/bounds_checking_function:libsec_static",
|
|
]
|
|
|
|
if (syscap_codec_config_extern_path != "") {
|
|
deps += [ "..:gen_syscap_define_custom" ]
|
|
inputs = [ "${root_build_dir}/syscap_define_custom.h" ]
|
|
include_dirs += [ "${root_build_dir}" ]
|
|
cflags = [ "-DSYSCAP_DEFINE_EXTERN_ENABLE" ]
|
|
}
|
|
|
|
external_deps = [ "napi:ace_napi" ]
|
|
|
|
if (defined(ohos_lite)) {
|
|
deps += [ "//build/lite/config/component/cJSON:cjson_static" ]
|
|
} else {
|
|
deps += [ "//third_party/cJSON:cjson_static" ]
|
|
}
|
|
|
|
relative_install_dir = "module"
|
|
subsystem_name = "developtools"
|
|
part_name = "syscap_codec"
|
|
}
|