mirror of
https://gitee.com/openharmony/third_party_jsoncpp
synced 2024-11-26 17:01:57 +00:00
commit
63b758fbfc
39
BUILD.gn
39
BUILD.gn
@ -13,6 +13,16 @@
|
||||
|
||||
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",
|
||||
@ -21,6 +31,10 @@ config("jsoncpp_config") {
|
||||
]
|
||||
}
|
||||
|
||||
config("flag_config") {
|
||||
cflags_cc = [ "-fexceptions" ]
|
||||
}
|
||||
|
||||
config("jsoncpp_public_config") {
|
||||
include_dirs = [ "//third_party/jsoncpp/include/" ]
|
||||
}
|
||||
@ -42,3 +56,28 @@ ohos_shared_library("jsoncpp") {
|
||||
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" ]
|
||||
public_configs = [ ":jsoncpp_public_config" ]
|
||||
public_configs += [ ":jsoncpp_config" ]
|
||||
public_configs += [ ":flag_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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user