mirror of
https://gitee.com/openharmony/third_party_jsoncpp
synced 2024-11-27 01:11:27 +00:00
1f1f4a51a0
Change-Id: I103bc8ddf7278ef6e2e340425d5aee72a4f13da6 Signed-off-by: zhangxiao72 <zhangxiao72@huawei.com>
83 lines
2.2 KiB
Plaintext
Executable File
83 lines
2.2 KiB
Plaintext
Executable File
# Copyright (c) 2021 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")
|
|
|
|
config("config_static") {
|
|
cflags = [
|
|
"-std=c++17",
|
|
"-Wno-error=implicit-fallthrough",
|
|
"-Wno-deprecated-declarations",
|
|
]
|
|
visibility = [ ":*" ]
|
|
include_dirs = [ "//third_party/jsoncpp/include" ]
|
|
}
|
|
|
|
config("jsoncpp_config") {
|
|
cflags = [
|
|
"-std=c++17",
|
|
"-Wno-error=implicit-fallthrough",
|
|
"-Wno-deprecated-declarations",
|
|
]
|
|
}
|
|
|
|
config("flag_config") {
|
|
cflags_cc = [ "-fexceptions" ]
|
|
}
|
|
|
|
config("jsoncpp_public_config") {
|
|
include_dirs = [ "//third_party/jsoncpp/include/" ]
|
|
}
|
|
|
|
ohos_shared_library("jsoncpp") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"//third_party/jsoncpp/src/lib_json/json_reader.cpp",
|
|
"//third_party/jsoncpp/src/lib_json/json_value.cpp",
|
|
"//third_party/jsoncpp/src/lib_json/json_writer.cpp",
|
|
]
|
|
use_exceptions = true
|
|
configs = [ ":jsoncpp_config" ]
|
|
include_dirs = [
|
|
"//third_party/jsoncpp/include/json/",
|
|
"//third_party/jsoncpp/include/",
|
|
]
|
|
public_configs = [ ":jsoncpp_public_config" ]
|
|
part_name = "jsoncpp"
|
|
subsystem_name = "thirdparty"
|
|
}
|
|
|
|
ohos_static_library("jsoncpp_static") {
|
|
sources = [
|
|
"//third_party/jsoncpp/src/lib_json/json_reader.cpp",
|
|
"//third_party/jsoncpp/src/lib_json/json_value.cpp",
|
|
"//third_party/jsoncpp/src/lib_json/json_writer.cpp",
|
|
]
|
|
use_exceptions = true
|
|
configs = [ ":config_static" ]
|
|
configs += [ ":flag_config" ]
|
|
public_configs = [ ":jsoncpp_public_config" ]
|
|
include_dirs = [
|
|
"//third_party/jsoncpp/include/json/",
|
|
"//third_party/jsoncpp/include/",
|
|
]
|
|
cflags_cc = [
|
|
"-DJSON_USE_EXCEPTION=0",
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wno-implicit-fallthrough",
|
|
]
|
|
part_name = "jsoncpp"
|
|
subsystem_name = "thirdparty"
|
|
}
|