Skip to content

Commit e4782f6

Browse files
Resolve SDK integration issues for JsonTLV library (project-chip#17930)
1 parent 9f755f9 commit e4782f6

File tree

3 files changed

+44
-3
lines changed

3 files changed

+44
-3
lines changed

build_overrides/jsoncpp.gni

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2020 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
declare_args() {
16+
jsoncpp_root = "//third_party/jsoncpp"
17+
}

examples/build_overrides/jsoncpp.gni

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2020 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
declare_args() {
16+
jsoncpp_root = "//third_party/connectedhomeip/third_party/jsoncpp"
17+
}

src/lib/support/jsontlv/BUILD.gn

+10-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@
1313
# limitations under the License.
1414

1515
import("//build_overrides/chip.gni")
16+
import("//build_overrides/jsoncpp.gni")
17+
18+
config("jsontlv_config") {
19+
cflags = [ "-Wno-implicit-fallthrough" ]
20+
}
1621

1722
static_library("jsontlv") {
23+
sources = [ "TlvJson.cpp" ]
24+
25+
public_configs = [ ":jsontlv_config" ]
26+
1827
public_deps = [
1928
"${chip_root}/src/lib/core",
20-
"${chip_root}/third_party/jsoncpp",
29+
jsoncpp_root,
2130
]
22-
23-
sources = [ "TlvJson.cpp" ]
2431
}

0 commit comments

Comments
 (0)