Skip to content

Commit

Permalink
Merge c084269 into 51cc67c
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin committed Aug 12, 2019
2 parents 51cc67c + c084269 commit 87a8cf9
Show file tree
Hide file tree
Showing 47 changed files with 115,904 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Expand Up @@ -4,9 +4,9 @@
[submodule "gtest"]
path = src/third_party/gtest
url = https://github.com/google/googletest
[submodule "dronecore-proto"]
path = src/backend/proto
url = https://github.com/dronecore/DroneCore-Proto.git
[submodule "mavsdk-proto"]
path = proto
url = https://github.com/mavlink/MAVSDK-Proto.git
[submodule "third_party/cpp_rsc"]
path = src/third_party/cpp_rsc
url = https://github.com/orex/cpp_rsc.git
2 changes: 0 additions & 2 deletions src/backend/CMakeLists.txt
@@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.1)

set(PROTO_DIR ${CMAKE_CURRENT_SOURCE_DIR}/proto/protos)

find_package(OpenSSL REQUIRED)
find_package(gRPC REQUIRED)

Expand Down
17 changes: 9 additions & 8 deletions src/backend/src/CMakeLists.txt
@@ -1,20 +1,21 @@
cmake_minimum_required(VERSION 3.1)

set(COMPONENTS_LIST core action calibration gimbal camera mission offboard telemetry info param)

include(cmake/compile_proto.cmake)
set(COMPONENTS_LIST action calibration camera core gimbal info mission offboard param telemetry)

foreach(COMPONENT_NAME ${COMPONENTS_LIST})
compile_proto_pb(${COMPONENT_NAME} PB_COMPILED_SOURCE)
compile_proto_grpc(${COMPONENT_NAME} GRPC_COMPILED_SOURCE)
add_library(${COMPONENT_NAME}_proto_gens STATIC ${GRPC_COMPILED_SOURCE} ${PB_COMPILED_SOURCE})
add_library(${COMPONENT_NAME}_proto_gens STATIC
${CMAKE_CURRENT_SOURCE_DIR}/generated/${COMPONENT_NAME}/${COMPONENT_NAME}.grpc.pb.cc
${CMAKE_CURRENT_SOURCE_DIR}/generated/${COMPONENT_NAME}/${COMPONENT_NAME}.pb.cc)

target_link_libraries(${COMPONENT_NAME}_proto_gens
gRPC::grpc++
)

target_include_directories(${COMPONENT_NAME}_proto_gens
PRIVATE
${CMAKE_BINARY_DIR}/src/backend/src
${PROJECT_SOURCE_DIR}/backend/src/generated
)

list(APPEND COMPONENTS_PROTOGENS ${COMPONENT_NAME}_proto_gens)
endforeach()

Expand Down Expand Up @@ -60,7 +61,7 @@ target_include_directories(mavsdk_server
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/plugins>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/backend/src/plugins>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src/backend/src>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/backend/src/generated>
$<INSTALL_INTERFACE:include>
)

Expand Down
31 changes: 0 additions & 31 deletions src/backend/src/cmake/compile_proto.cmake

This file was deleted.

675 changes: 675 additions & 0 deletions src/backend/src/generated/action/action.grpc.pb.cc

Large diffs are not rendered by default.

2,507 changes: 2,507 additions & 0 deletions src/backend/src/generated/action/action.grpc.pb.h

Large diffs are not rendered by default.

0 comments on commit 87a8cf9

Please sign in to comment.