From df010713792a2a6361ffaa38bbe1965d57b189cb Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk Date: Tue, 11 Jan 2022 08:29:26 +0100 Subject: [PATCH] Extracted additional data payload files from the setup payload --- src/platform/nrfconnect/BUILD.gn | 2 +- src/platform/telink/BUILD.gn | 2 +- src/setup_payload/BUILD.gn | 20 ++++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/platform/nrfconnect/BUILD.gn b/src/platform/nrfconnect/BUILD.gn index a2816afb4e4bb0..30893e96fb4cf6 100644 --- a/src/platform/nrfconnect/BUILD.gn +++ b/src/platform/nrfconnect/BUILD.gn @@ -47,7 +47,7 @@ static_library("nrfconnect") { "SystemPlatformConfig.h", ] - deps = [ "${chip_root}/src/setup_payload" ] + deps = [ "${chip_root}/src/setup_payload:additional_data_payload" ] public_deps = [ "${chip_root}/src/platform:platform_base" ] diff --git a/src/platform/telink/BUILD.gn b/src/platform/telink/BUILD.gn index 783fd2c1b496b8..3b025a247c8935 100644 --- a/src/platform/telink/BUILD.gn +++ b/src/platform/telink/BUILD.gn @@ -64,5 +64,5 @@ static_library("telink") { public_deps += [ "${chip_root}/src/crypto", - "${chip_root}/src/setup_payload" ] + "${chip_root}/src/setup_payload:additional_data_payload" ] } diff --git a/src/setup_payload/BUILD.gn b/src/setup_payload/BUILD.gn index 2e6dcd2141a48c..e3b99bd805dce2 100644 --- a/src/setup_payload/BUILD.gn +++ b/src/setup_payload/BUILD.gn @@ -14,15 +14,26 @@ import("//build_overrides/chip.gni") -static_library("setup_payload") { - output_name = "libSetupPayload" - - sources = [ +source_set("additional_data_payload") { + sources = [ "AdditionalDataPayload.h", "AdditionalDataPayloadGenerator.cpp", "AdditionalDataPayloadGenerator.h", "AdditionalDataPayloadParser.cpp", "AdditionalDataPayloadParser.h", + ] + + public_deps = [ + "${chip_root}/src/crypto", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + +static_library("setup_payload") { + output_name = "libSetupPayload" + + sources = [ "Base38.h", "Base38Decode.cpp", "Base38Decode.h", @@ -45,6 +56,7 @@ static_library("setup_payload") { cflags = [ "-Wconversion" ] public_deps = [ + ":additional_data_payload", "${chip_root}/src/crypto", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support",