diff --git a/build_overrides/jsoncpp.gni b/build_overrides/jsoncpp.gni new file mode 100644 index 00000000000000..c71778bd61376a --- /dev/null +++ b/build_overrides/jsoncpp.gni @@ -0,0 +1,17 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# 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. + +declare_args() { + jsoncpp_root = "//third_party/jsoncpp" +} diff --git a/examples/build_overrides/jsoncpp.gni b/examples/build_overrides/jsoncpp.gni new file mode 100644 index 00000000000000..f38a2475440a77 --- /dev/null +++ b/examples/build_overrides/jsoncpp.gni @@ -0,0 +1,17 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# 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. + +declare_args() { + jsoncpp_root = "//third_party/connectedhomeip/third_party/jsoncpp" +} diff --git a/src/lib/support/jsontlv/BUILD.gn b/src/lib/support/jsontlv/BUILD.gn index 97c92879050d3b..4bcea650508b75 100644 --- a/src/lib/support/jsontlv/BUILD.gn +++ b/src/lib/support/jsontlv/BUILD.gn @@ -13,12 +13,19 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("//build_overrides/jsoncpp.gni") + +config("jsontlv_config") { + cflags = [ "-Wno-implicit-fallthrough" ] +} static_library("jsontlv") { + sources = [ "TlvJson.cpp" ] + + public_configs = [ ":jsontlv_config" ] + public_deps = [ "${chip_root}/src/lib/core", - "${chip_root}/third_party/jsoncpp", + jsoncpp_root, ] - - sources = [ "TlvJson.cpp" ] }