Skip to content

Commit

Permalink
Start separating generated files in unique folder instead of inside t…
Browse files Browse the repository at this point in the history
…he src/example tree (#9124)

* Start creating a zzz_generated folder

* Allow output folder argument in zap generation python script. Verified that regenall was a noop

* moved all generated files from examples into zzz_generated (by running regen-all)

* Update gen folder as "zap-generated"

* Rename gen to zap-generated in includes

* More generated path renaming

* update the cluster template generation to use the new zap-generated name

* Rename more zap generated files

* more renames and zapt updates. Fix build rule dependency

* Add config dependency on data model: only need include paths

* Fix include order. Lighting app on linux compiles

* Add TODO regarding config path ordering

* Prepare example generated files: nrf builds compile

* Make lock app compile on nrf with the new directory structure

* update telink makefile to match the new  zap generated outputs

* More compile logic updates

* esp32 compiles now

* Make the bridge app  compile on esp32

* Exclude zap generated files from doxygen

* Fix typo in CHIPCert, move the darwin header/mm files

* Update a few more gen folder usages

* Update java to zap-generated, move more files around

* Restyle fixes

* Update path inside pbxproj

* Fix up lighting app cmake for mbed

* Update lock generated files for esp32 lock app

* Update paths for generated file for lock app cmakefiles

* One more cmake fix for esp32

* Update CMakeLists.txt for the temperature measurement app

* Add back af-gen-event.h even though they are NOT currently generated

* Undo the data_model include logic

* Move ota-provider-app to zzz_generated

* Fix android build

* Fix ota provider app build path for zap generated files

* Restyle fixes

* Fix up ota build

* Updated fix for ota provider app build rules

* Create ota-provider-app config globally, to fix up includes for common paths

* Restyle fixes

* Update relative paths into ota-provider-common to  use top level include

* Do not use relative path in includes in ota provider common
  • Loading branch information
andy31415 authored and pull[bot] committed Aug 20, 2021
1 parent bd49683 commit 05f043d
Show file tree
Hide file tree
Showing 200 changed files with 171 additions and 119 deletions.
3 changes: 2 additions & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,8 @@ EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = NetworkProvisioningServer* \
*/tests/* \
*/dbus/* \
*/gen/*
*/gen/* \
*/zap-generated/*

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/all-clusters-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import("${chip_root}/src/app/chip_data_model.gni")
chip_data_model("all-clusters-common") {
zap_file = "all-clusters-app.zap"

zap_pregenerated_dir = "gen"
zap_pregenerated_dir =
"${chip_root}/zzz_generated/all-clusters-app/zap-generated"
is_server = true
}
3 changes: 2 additions & 1 deletion examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
# The list of src and include dirs must be in sync with that in all-clusters-app/esp32/main/component.mk
set(PRIV_INCLUDE_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlio/repo/include"
Expand All @@ -26,7 +27,7 @@ set(PRIV_INCLUDE_DIRS_LIST
)
set(SRC_DIRS_LIST
"${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/gen"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app/zap-generated"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/common/gen/attributes"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
Expand Down
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import("${chip_root}/src/app/chip_data_model.gni")
chip_data_model("bridge-common") {
zap_file = "bridge-app.zap"

zap_pregenerated_dir = "gen"
zap_pregenerated_dir = "${chip_root}/zzz_generated/bridge-app/zap-generated"
is_server = true

# TODO: the definition of DYNAMIC_ENDPOINT_COUNT needs find a common home!
Expand Down
4 changes: 2 additions & 2 deletions examples/bridge-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/bridge-app/bridge-common"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/bridge-app"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32"
"${CMAKE_CURRENT_LIST_DIR}/include"
SRC_DIRS
"${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/bridge-app/bridge-common/gen"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/bridge-app/zap-generated"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/common/gen/attributes"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
Expand All @@ -39,4 +40,3 @@ idf_component_register(PRIV_INCLUDE_DIRS

set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 14)
target_compile_options(${COMPONENT_LIB} PRIVATE "-DLWIP_IPV6_SCOPES=0" "-DCHIP_HAVE_CONFIG_H")

4 changes: 2 additions & 2 deletions examples/bridge-app/linux/include/Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#pragma once

//#include "gen/attribute-id.h"
//#include "gen/cluster-id.h"
//#include <zap-generated/attribute-id.h>
//#include <zap-generated/cluster-id.h>
//#include <app/chip-zcl-zpro-codec.h>
//#include <app/util/af-types.h>
//#include <app/util/af.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool-darwin/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#import <CHIP/CHIPPersistentStorageDelegate.h>
#import <CHIP/CHIPQRCodeSetupPayloadParser.h>
#import <CHIP/CHIPSetupPayload.h>
#import <CHIP/gen/CHIPClustersObjc.h>
#import <CHIP/zap-generated/CHIPClustersObjc.h>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) { return EXIT_SUCCESS; }
4 changes: 2 additions & 2 deletions examples/chip-tool/commands/clusters/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
#include <cstdint>

#include "ModelCommand.h"
#include "gen/CHIPClientCallbacks.h"
#include "gen/CHIPClusters.h"
#include <lib/core/CHIPSafeCasts.h>
#include <support/BytesToHex.h>
#include <zap-generated/CHIPClientCallbacks.h>
#include <zap-generated/CHIPClusters.h>

static void OnDefaultSuccessResponse(void * context)
{
Expand Down
4 changes: 2 additions & 2 deletions examples/chip-tool/commands/pairing/PairingCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#include "../../config/PersistentStorage.h"
#include "../common/Command.h"
#include "gen/CHIPClientCallbacks.h"
#include "gen/CHIPClusters.h"
#include <zap-generated/CHIPClientCallbacks.h>
#include <zap-generated/CHIPClusters.h>

#include <controller/ExampleOperationalCredentialsIssuer.h>
#include <lib/support/ThreadOperationalDataset.h>
Expand Down
4 changes: 2 additions & 2 deletions examples/chip-tool/commands/reporting/ReportingCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "ReportingCommand.h"

#include "../common/Commands.h"
#include "gen/CHIPClientCallbacks.h"
#include "gen/CHIPClusters.h"
#include <zap-generated/CHIPClientCallbacks.h>
#include <zap-generated/CHIPClusters.h>

using namespace ::chip;

Expand Down
4 changes: 2 additions & 2 deletions examples/chip-tool/templates/commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <cstdint>

#include "ModelCommand.h"
#include "gen/CHIPClientCallbacks.h"
#include "gen/CHIPClusters.h"
#include <zap-generated/CHIPClientCallbacks.h>
#include <zap-generated/CHIPClusters.h>
#include <lib/core/CHIPSafeCasts.h>
#include <support/BytesToHex.h>

Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ if (chip_enable_pw_rpc) {
chip_data_model("lighting-common") {
zap_file = "lighting-app.zap"

zap_pregenerated_dir = "gen"
zap_pregenerated_dir = "${chip_root}/zzz_generated/lighting-app/zap-generated"
is_server = true
}
10 changes: 6 additions & 4 deletions examples/lighting-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ cmake_minimum_required(VERSION 3.19.0)
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH)
get_filename_component(APP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/.. REALPATH)
get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH)
get_filename_component(LIGHTING_COMMON ${CHIP_ROOT}/examples/lighting-app/lighting-common REALPATH)
get_filename_component(LIGHTING_GEN_DIR ${CHIP_ROOT}/zzz_generated/lighting-app/ REALPATH)
set(LIGHTING_GEN_SRC ${LIGHTING_GEN_DIR}/zap-generated/)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config.in
Expand Down Expand Up @@ -34,6 +35,7 @@ target_include_directories(${APP_TARGET} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/main/include/
${APP_ROOT}/lighting-common
${MBED_COMMON}/util/include
${LIGHTING_GEN_DIR}
${CHIP_ROOT}/src/app
${CHIP_ROOT}/third_party/nlio/repo/include
)
Expand All @@ -43,9 +45,9 @@ target_sources(${APP_TARGET} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/main/LightingManager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main/ZclCallbacks.cpp
${LIGHTING_COMMON}/gen/attribute-size.cpp
${APP_ROOT}/lighting-common/gen/callback-stub.cpp
${LIGHTING_COMMON}/gen/IMClusterCommandHandler.cpp
${LIGHTING_GEN_SRC}/attribute-size.cpp
${LIGHTING_GEN_SRC}/callback-stub.cpp
${LIGHTING_GEN_SRC}/IMClusterCommandHandler.cpp
${MBED_COMMON}/util/LEDWidget.cpp
${CHIP_ROOT}/src/app/common/gen/attributes/Accessors.cpp
${CHIP_ROOT}/src/app/util/DataModelHandler.cpp
Expand Down
9 changes: 6 additions & 3 deletions examples/lighting-app/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connect
get_filename_component(NLIO_ROOT ${CHIP_ROOT}/third_party/nlio/repo/include REALPATH)
get_filename_component(NRFCONNECT_COMMON ${CHIP_ROOT}/examples/platform/nrfconnect REALPATH)
get_filename_component(LIGHTING_COMMON ${CHIP_ROOT}/examples/lighting-app/lighting-common REALPATH)
get_filename_component(LIGHTING_GEN_DIR ${CHIP_ROOT}/zzz_generated/lighting-app/ REALPATH)
set(LIGHTING_GEN_SRC ${LIGHTING_GEN_DIR}/zap-generated/)

include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)

Expand Down Expand Up @@ -52,6 +54,7 @@ target_compile_options(app PRIVATE -Werror)
target_include_directories(app PRIVATE
main/include
${LIGHTING_COMMON}
${LIGHTING_GEN_DIR}
${NLIO_ROOT}
${NRFCONNECT_COMMON}/util/include
${NRFCONNECT_COMMON}/app/include)
Expand All @@ -61,9 +64,9 @@ target_sources(app PRIVATE
main/LightingManager.cpp
main/main.cpp
main/ZclCallbacks.cpp
${LIGHTING_COMMON}/gen/attribute-size.cpp
${LIGHTING_COMMON}/gen/callback-stub.cpp
${LIGHTING_COMMON}/gen/IMClusterCommandHandler.cpp
${LIGHTING_GEN_SRC}/attribute-size.cpp
${LIGHTING_GEN_SRC}/callback-stub.cpp
${LIGHTING_GEN_SRC}/IMClusterCommandHandler.cpp
${NRFCONNECT_COMMON}/util/LEDWidget.cpp
${NRFCONNECT_COMMON}/util/ThreadUtil.cpp
${CHIP_ROOT}/src/app/common/gen/attributes/Accessors.cpp
Expand Down
11 changes: 6 additions & 5 deletions examples/lighting-app/telink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ cmake_minimum_required(VERSION 3.13.1)
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
get_filename_component(NLIO_ROOT ${CHIP_ROOT}/third_party/nlio/repo/include REALPATH)
get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH)
get_filename_component(LIGHTING_COMMON ${CHIP_ROOT}/examples/lighting-app/lighting-common REALPATH)
get_filename_component(LIGHTING_GEN_DIR ${CHIP_ROOT}/zzz_generated/lighting-app/ REALPATH)
set(LIGHTING_GEN_SRC ${LIGHTING_GEN_DIR}/zap-generated/)

set(CONF_FILE ${CHIP_ROOT}/config/telink/app/zephyr.conf prj.conf)

Expand All @@ -34,7 +35,7 @@ target_compile_options(app PRIVATE -fpermissive)

target_include_directories(app PRIVATE
include
${LIGHTING_COMMON}
${LIGHTING_GEN_DIR}
${NLIO_ROOT}
${TELINK_COMMON}/util/include
${TELINK_COMMON}/app/include)
Expand All @@ -44,9 +45,9 @@ target_sources(app PRIVATE
src/LightingManager.cpp
src/main.cpp
src/ZclCallbacks.cpp
${LIGHTING_COMMON}/gen/attribute-size.cpp
${LIGHTING_COMMON}/gen/callback-stub.cpp
${LIGHTING_COMMON}/gen/IMClusterCommandHandler.cpp
${LIGHTING_GEN_SRC}/attribute-size.cpp
${LIGHTING_GEN_SRC}/callback-stub.cpp
${LIGHTING_GEN_SRC}/IMClusterCommandHandler.cpp
${TELINK_COMMON}/util/src/LEDWidget.cpp
${TELINK_COMMON}/util/src/ButtonManager.cpp
${TELINK_COMMON}/util/src/ThreadUtil.cpp
Expand Down
10 changes: 5 additions & 5 deletions examples/lock-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ idf_component_register(INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/../../platform/esp32"
"${CMAKE_SOURCE_DIR}/../../common/pigweed"
"${CMAKE_SOURCE_DIR}/../../common/pigweed/esp32"
"${CMAKE_SOURCE_DIR}/../../../src/lib/support"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lock-app/lock-common"
"${CMAKE_CURRENT_LIST_DIR}/include"
"${IDF_PATH}/components/freertos/include/freertos"
SRC_DIRS
"${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_SOURCE_DIR}/../../platform/esp32"
"${CMAKE_SOURCE_DIR}/../../common/pigweed"
"${CMAKE_SOURCE_DIR}/../../common/pigweed/esp32"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lock-app/lock-common/gen"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/zap-generated"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/common/gen/attributes"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
Expand Down Expand Up @@ -114,12 +114,12 @@ target_include_directories(${chip_lib} PUBLIC
else (CONFIG_ENABLE_PW_RPC)
idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lock-app/lock-common"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32"
"${CMAKE_CURRENT_LIST_DIR}/include"
SRC_DIRS
"${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lock-app/lock-common/gen"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/zap-generated"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/common/gen/attributes"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/lock-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ if (chip_enable_pw_rpc) {
chip_data_model("lock-common") {
zap_file = "lock-app.zap"

zap_pregenerated_dir = "gen"
zap_pregenerated_dir = "${chip_root}/zzz_generated/lock-app/zap-generated"
is_server = true
}
11 changes: 6 additions & 5 deletions examples/lock-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ cmake_minimum_required(VERSION 3.19.0)
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH)
get_filename_component(APP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/.. REALPATH)
get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH)
get_filename_component(LOCK_COMMON ${CHIP_ROOT}/examples/lock-app/lock-common REALPATH)
get_filename_component(LOCK_GEN_DIR ${CHIP_ROOT}/zzz_generated/lock-app/ REALPATH)
set(LOCK_GEN_SRC ${LOCK_GEN_DIR}/zap-generated/)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config.in
Expand All @@ -32,20 +33,20 @@ add_executable(${APP_TARGET})
target_include_directories(${APP_TARGET} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/main/include/
${APP_ROOT}/lock-common
${MBED_COMMON}/util/include
${CHIP_ROOT}/src/app
${CHIP_ROOT}/third_party/nlio/repo/include
${LOCK_GEN_DIR}
)

target_sources(${APP_TARGET} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/main/AppTask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main/BoltLockManager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main/ZclCallbacks.cpp
${LOCK_COMMON}/gen/attribute-size.cpp
${APP_ROOT}/lock-common/gen/callback-stub.cpp
${LOCK_COMMON}/gen/IMClusterCommandHandler.cpp
${LOCK_GEN_SRC}/attribute-size.cpp
${LOCK_GEN_SRC}/callback-stub.cpp
${LOCK_GEN_SRC}/IMClusterCommandHandler.cpp
${MBED_COMMON}/util/LEDWidget.cpp
${CHIP_ROOT}/src/app/util/DataModelHandler.cpp
${CHIP_ROOT}/src/app/common/gen/attributes/Accessors.cpp
Expand Down
11 changes: 6 additions & 5 deletions examples/lock-app/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ cmake_minimum_required(VERSION 3.13.1)
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
get_filename_component(NLIO_ROOT ${CHIP_ROOT}/third_party/nlio/repo/include REALPATH)
get_filename_component(NRFCONNECT_COMMON ${CHIP_ROOT}/examples/platform/nrfconnect REALPATH)
get_filename_component(LOCK_COMMON ${CHIP_ROOT}/examples/lock-app/lock-common REALPATH)
get_filename_component(LOCK_GEN_DIR ${CHIP_ROOT}/zzz_generated/lock-app/ REALPATH)
set(LOCK_GEN_SRC ${LOCK_GEN_DIR}/zap-generated/)

include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)

Expand Down Expand Up @@ -51,7 +52,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake)

target_include_directories(app PRIVATE
main/include
${LOCK_COMMON}
${LOCK_GEN_DIR}
${NLIO_ROOT}
${NRFCONNECT_COMMON}/util/include
${NRFCONNECT_COMMON}/app/include)
Expand All @@ -61,9 +62,9 @@ target_sources(app PRIVATE
main/BoltLockManager.cpp
main/main.cpp
main/ZclCallbacks.cpp
${LOCK_COMMON}/gen/attribute-size.cpp
${LOCK_COMMON}/gen/callback-stub.cpp
${LOCK_COMMON}/gen/IMClusterCommandHandler.cpp
${LOCK_GEN_SRC}/attribute-size.cpp
${LOCK_GEN_SRC}/callback-stub.cpp
${LOCK_GEN_SRC}/IMClusterCommandHandler.cpp
${NRFCONNECT_COMMON}/util/LEDWidget.cpp
${NRFCONNECT_COMMON}/util/ThreadUtil.cpp
${CHIP_ROOT}/src/app/util/DataModelHandler.cpp
Expand Down
4 changes: 2 additions & 2 deletions examples/ota-provider-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include <support/RandUtils.h>
#include <support/logging/CHIPLogging.h>

#include "BdxOtaSender.h"
#include "OTAProviderExample.h"
#include <ota-provider-common/BdxOtaSender.h>
#include <ota-provider-common/OTAProviderExample.h>

#include <fstream>
#include <iostream>
Expand Down
11 changes: 10 additions & 1 deletion examples/ota-provider-app/ota-provider-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,26 @@ import("//build_overrides/chip.gni")

import("${chip_root}/src/app/chip_data_model.gni")

config("config") {
include_dirs = [ ".." ]
}

chip_data_model("ota-provider-common") {
zap_file = "ota-provider-app.zap"

zap_pregenerated_dir = "gen"
zap_pregenerated_dir =
"${chip_root}/zzz_generated/ota-provider-app/zap-generated"

sources = [
"BdxOtaSender.cpp",
"BdxOtaSender.h",
"OTAProviderExample.cpp",
"OTAProviderExample.h",
]

deps = [ "${chip_root}/src/protocols/bdx" ]

is_server = true

public_configs = [ ":config" ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

#include "BdxOtaSender.h"
#include <ota-provider-common/BdxOtaSender.h>

#include <core/CHIPError.h>
#include <messaging/ExchangeContext.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

#include "OTAProviderExample.h"
#include <ota-provider-common/OTAProviderExample.h>

#include <app/CommandPathParams.h>
#include <app/clusters/ota-provider/ota-provider-delegate.h>
Expand Down
Loading

0 comments on commit 05f043d

Please sign in to comment.