From 93a2c0969c5b1ca8febe304fe7946ab7ab67501e Mon Sep 17 00:00:00 2001 From: philippe44 Date: Wed, 10 May 2023 16:45:50 +0200 Subject: [PATCH] synchronizing with host versions --- .../bell/external/nanopb/extra/FindNanopb.cmake | 13 ++++++++++--- .../spotify/cspot/protobuf/authentication.proto | 2 ++ components/spotify/cspot/protobuf/keyexchange.proto | 2 ++ components/spotify/cspot/protobuf/mercury.proto | 2 ++ components/spotify/cspot/protobuf/spirc.proto | 2 ++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/components/spotify/cspot/bell/external/nanopb/extra/FindNanopb.cmake b/components/spotify/cspot/bell/external/nanopb/extra/FindNanopb.cmake index 3f82b7b8..84016b31 100644 --- a/components/spotify/cspot/bell/external/nanopb/extra/FindNanopb.cmake +++ b/components/spotify/cspot/bell/external/nanopb/extra/FindNanopb.cmake @@ -118,12 +118,15 @@ # #============================================================================= - function(NANOPB_GENERATE_CPP SRCS HDRS) cmake_parse_arguments(NANOPB_GENERATE_CPP "" "RELPATH" "" ${ARGN}) if(NOT NANOPB_GENERATE_CPP_UNPARSED_ARGUMENTS) return() endif() + + if(MSVC) + set(CALL_PREFIX call) + endif() if(NANOPB_GENERATE_CPP_APPEND_PATH) # Create an include path for each file specified @@ -184,7 +187,7 @@ function(NANOPB_GENERATE_CPP SRCS HDRS) set(GENERATOR_CORE_PYTHON_SRC ${GENERATOR_CORE_PYTHON_SRC} ${output}) add_custom_command( OUTPUT ${output} - COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} + COMMAND ${CALL_PREFIX} ${PROTOBUF_PROTOC_EXECUTABLE} ARGS -I${GENERATOR_PATH}/proto --python_out=${GENERATOR_CORE_DIR} ${ABS_FIL} DEPENDS ${ABS_FIL} @@ -276,7 +279,7 @@ function(NANOPB_GENERATE_CPP SRCS HDRS) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_PATH_REL}/${FIL_WE}.pb.c" "${CMAKE_CURRENT_BINARY_DIR}/${FIL_PATH_REL}/${FIL_WE}.pb.h" - COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} + COMMAND ${CALL_PREFIX} ${PROTOBUF_PROTOC_EXECUTABLE} ARGS -I${GENERATOR_PATH} -I${GENERATOR_CORE_DIR} -I${CMAKE_CURRENT_BINARY_DIR} ${_nanopb_include_path} --plugin=protoc-gen-nanopb=${NANOPB_GENERATOR_PLUGIN} @@ -292,6 +295,10 @@ function(NANOPB_GENERATE_CPP SRCS HDRS) set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE) set(${SRCS} ${${SRCS}} ${NANOPB_SRCS} PARENT_SCOPE) set(${HDRS} ${${HDRS}} ${NANOPB_HDRS} PARENT_SCOPE) + + if(MSVC) + unset(CALL_PREFIX) + endif() endfunction() diff --git a/components/spotify/cspot/protobuf/authentication.proto b/components/spotify/cspot/protobuf/authentication.proto index d3896147..543331a4 100644 --- a/components/spotify/cspot/protobuf/authentication.proto +++ b/components/spotify/cspot/protobuf/authentication.proto @@ -1,3 +1,5 @@ +syntax = "proto2"; + enum CpuFamily { CPU_UNKNOWN = 0x0; CPU_X86 = 0x1; diff --git a/components/spotify/cspot/protobuf/keyexchange.proto b/components/spotify/cspot/protobuf/keyexchange.proto index a816d1ee..55cd802a 100644 --- a/components/spotify/cspot/protobuf/keyexchange.proto +++ b/components/spotify/cspot/protobuf/keyexchange.proto @@ -1,3 +1,5 @@ +syntax = "proto2"; + message LoginCryptoDiffieHellmanChallenge { required bytes gs = 0xa; } diff --git a/components/spotify/cspot/protobuf/mercury.proto b/components/spotify/cspot/protobuf/mercury.proto index 72138948..60c752aa 100644 --- a/components/spotify/cspot/protobuf/mercury.proto +++ b/components/spotify/cspot/protobuf/mercury.proto @@ -1,3 +1,5 @@ +syntax = "proto2"; + message Header { optional string uri = 0x01; optional string method = 0x03; diff --git a/components/spotify/cspot/protobuf/spirc.proto b/components/spotify/cspot/protobuf/spirc.proto index 5d54bd26..3b5448f9 100644 --- a/components/spotify/cspot/protobuf/spirc.proto +++ b/components/spotify/cspot/protobuf/spirc.proto @@ -1,3 +1,5 @@ +syntax = "proto2"; + enum MessageType { kMessageTypeHello = 0x1; kMessageTypeGoodbye = 0x2;